Full Code of thomaspaulmann/HeartControl for AI

master 020c823194e7 cached
30 files
62.8 KB
19.9k tokens
1 requests
Download .txt
Repository: thomaspaulmann/HeartControl
Branch: master
Commit: 020c823194e7
Files: 30
Total size: 62.8 KB

Directory structure:
gitextract_yi781vpn/

├── .gitignore
├── Design/
│   └── heart-control.sketch
├── Heart Control/
│   ├── AppDelegate.swift
│   ├── Assets.xcassets/
│   │   ├── AppIcon.appiconset/
│   │   │   └── Contents.json
│   │   ├── Contents.json
│   │   └── Heart Control.imageset/
│   │       └── Contents.json
│   ├── Base.lproj/
│   │   ├── LaunchScreen.storyboard
│   │   └── Main.storyboard
│   ├── Heart Control.entitlements
│   ├── Info.plist
│   └── ViewController.swift
├── Heart Control WatchKit App/
│   ├── Assets.xcassets/
│   │   └── AppIcon.appiconset/
│   │       └── Contents.json
│   ├── Base.lproj/
│   │   └── Interface.storyboard
│   └── Info.plist
├── Heart Control WatchKit Extension/
│   ├── Assets.xcassets/
│   │   └── Complication.complicationset/
│   │       ├── Circular.imageset/
│   │       │   └── Contents.json
│   │       ├── Contents.json
│   │       ├── Modular.imageset/
│   │       │   └── Contents.json
│   │       └── Utilitarian.imageset/
│   │           └── Contents.json
│   ├── AuthorizationManger.swift
│   ├── ExtensionDelegate.swift
│   ├── HKUnit+BeatsPerMinute.swift
│   ├── Heart Control WatchKit Extension.entitlements
│   ├── HeartRate.swift
│   ├── HeartRateManager.swift
│   ├── Info.plist
│   ├── InterfaceController.swift
│   └── WorkoutManager.swift
├── Heart Control.xcodeproj/
│   ├── project.pbxproj
│   └── project.xcworkspace/
│       └── contents.xcworkspacedata
└── README.md

================================================
FILE CONTENTS
================================================

================================================
FILE: .gitignore
================================================
# Build generated
build/
DerivedData/

# Various settings
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata/

# Other
.DS_Store
*.moved-aside
*.xcuserstate

# Obj-C/Swift specific
*.hmap
*.ipa

# Playgrounds
timeline.xctimeline
playground.xcworkspace

================================================
FILE: Heart Control/AppDelegate.swift
================================================
//
//  AppDelegate.swift
//  Heart Control
//
//  Created by Thomas Paul Mann on 01/08/16.
//  Copyright © 2016 Thomas Paul Mann. All rights reserved.
//

import UIKit
import HealthKit

@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {

    // MARK: - Properties

    private let healthStore = HKHealthStore()

    var window: UIWindow?

    // MARK: - Lifecycle

    private func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
        return true
    }

    func applicationShouldRequestHealthAuthorization(_ application: UIApplication) {
        // Authorize access to health data for watch.
        healthStore.handleAuthorizationForExtension { success, error in
            print(success)
        }
    }

}



================================================
FILE: Heart Control/Assets.xcassets/AppIcon.appiconset/Contents.json
================================================
{
  "images" : [
    {
      "idiom" : "iphone",
      "size" : "20x20",
      "scale" : "2x"
    },
    {
      "idiom" : "iphone",
      "size" : "20x20",
      "scale" : "3x"
    },
    {
      "size" : "29x29",
      "idiom" : "iphone",
      "filename" : "Icon-App-29x29@1x.png",
      "scale" : "1x"
    },
    {
      "size" : "29x29",
      "idiom" : "iphone",
      "filename" : "Icon-App-29x29@2x.png",
      "scale" : "2x"
    },
    {
      "idiom" : "iphone",
      "size" : "29x29",
      "scale" : "3x"
    },
    {
      "idiom" : "iphone",
      "size" : "40x40",
      "scale" : "2x"
    },
    {
      "size" : "40x40",
      "idiom" : "iphone",
      "filename" : "Icon-App-40x40@3x.png",
      "scale" : "3x"
    },
    {
      "size" : "60x60",
      "idiom" : "iphone",
      "filename" : "Icon-App-60x60@2x.png",
      "scale" : "2x"
    },
    {
      "idiom" : "iphone",
      "size" : "60x60",
      "scale" : "3x"
    },
    {
      "idiom" : "ipad",
      "size" : "20x20",
      "scale" : "1x"
    },
    {
      "idiom" : "ipad",
      "size" : "20x20",
      "scale" : "2x"
    },
    {
      "idiom" : "ipad",
      "size" : "29x29",
      "scale" : "1x"
    },
    {
      "idiom" : "ipad",
      "size" : "29x29",
      "scale" : "2x"
    },
    {
      "size" : "40x40",
      "idiom" : "ipad",
      "filename" : "Icon-App-40x40@1x.png",
      "scale" : "1x"
    },
    {
      "idiom" : "ipad",
      "size" : "40x40",
      "scale" : "2x"
    },
    {
      "size" : "76x76",
      "idiom" : "ipad",
      "filename" : "Icon-App-76x76@1x.png",
      "scale" : "1x"
    },
    {
      "size" : "76x76",
      "idiom" : "ipad",
      "filename" : "Icon-App-76x76@2x.png",
      "scale" : "2x"
    },
    {
      "size" : "83.5x83.5",
      "idiom" : "ipad",
      "filename" : "Icon-App-83.5x83.5@2x.png",
      "scale" : "2x"
    },
    {
      "idiom" : "car",
      "size" : "60x60",
      "scale" : "2x"
    },
    {
      "size" : "60x60",
      "idiom" : "car",
      "filename" : "Icon-App-60x60@3x.png",
      "scale" : "3x"
    },
    {
      "size" : "24x24",
      "idiom" : "watch",
      "scale" : "2x",
      "role" : "notificationCenter",
      "subtype" : "38mm"
    },
    {
      "size" : "27.5x27.5",
      "idiom" : "watch",
      "scale" : "2x",
      "role" : "notificationCenter",
      "subtype" : "42mm"
    },
    {
      "size" : "29x29",
      "idiom" : "watch",
      "role" : "companionSettings",
      "scale" : "2x"
    },
    {
      "size" : "29x29",
      "idiom" : "watch",
      "filename" : "Icon-App-29x29@3x.png",
      "role" : "companionSettings",
      "scale" : "3x"
    },
    {
      "size" : "40x40",
      "idiom" : "watch",
      "filename" : "Icon-App-40x40@2x.png",
      "scale" : "2x",
      "role" : "appLauncher",
      "subtype" : "38mm"
    },
    {
      "size" : "44x44",
      "idiom" : "watch",
      "scale" : "2x",
      "role" : "longLook",
      "subtype" : "42mm"
    },
    {
      "size" : "86x86",
      "idiom" : "watch",
      "scale" : "2x",
      "role" : "quickLook",
      "subtype" : "38mm"
    },
    {
      "size" : "98x98",
      "idiom" : "watch",
      "scale" : "2x",
      "role" : "quickLook",
      "subtype" : "42mm"
    }
  ],
  "info" : {
    "version" : 1,
    "author" : "xcode"
  }
}

================================================
FILE: Heart Control/Assets.xcassets/Contents.json
================================================
{
  "info" : {
    "version" : 1,
    "author" : "xcode"
  }
}

================================================
FILE: Heart Control/Assets.xcassets/Heart Control.imageset/Contents.json
================================================
{
  "images" : [
    {
      "idiom" : "universal",
      "scale" : "1x"
    },
    {
      "idiom" : "universal",
      "filename" : "Heart Control.png",
      "scale" : "2x"
    },
    {
      "idiom" : "universal",
      "scale" : "3x"
    }
  ],
  "info" : {
    "version" : 1,
    "author" : "xcode"
  }
}

================================================
FILE: Heart Control/Base.lproj/LaunchScreen.storyboard
================================================
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="11129.15" systemVersion="15F34" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
    <dependencies>
        <deployment identifier="iOS"/>
        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11103.10"/>
        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
    </dependencies>
    <scenes>
        <!--View Controller-->
        <scene sceneID="EHf-IW-A2E">
            <objects>
                <viewController id="01J-lp-oVM" sceneMemberID="viewController">
                    <layoutGuides>
                        <viewControllerLayoutGuide type="top" id="Llm-lL-Icb"/>
                        <viewControllerLayoutGuide type="bottom" id="xb3-aO-Qok"/>
                    </layoutGuides>
                    <view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
                        <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
                        <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                        <subviews>
                            <imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="Heart Control" translatesAutoresizingMaskIntoConstraints="NO" id="qyy-B4-SPj"/>
                        </subviews>
                        <color key="backgroundColor" red="0.76078431372549016" green="0.82352941176470584" blue="0.8784313725490196" alpha="1" colorSpace="calibratedRGB"/>
                        <constraints>
                            <constraint firstItem="qyy-B4-SPj" firstAttribute="centerY" secondItem="Ze5-6b-2t3" secondAttribute="centerY" id="cuP-3L-dhK"/>
                            <constraint firstItem="qyy-B4-SPj" firstAttribute="leading" secondItem="Ze5-6b-2t3" secondAttribute="leading" constant="90" id="gDr-bc-Aaw"/>
                            <constraint firstAttribute="trailing" secondItem="qyy-B4-SPj" secondAttribute="trailing" constant="90" id="hDZ-Tz-rx4"/>
                            <constraint firstItem="qyy-B4-SPj" firstAttribute="centerX" secondItem="Ze5-6b-2t3" secondAttribute="centerX" id="nI1-e6-4q3"/>
                        </constraints>
                    </view>
                </viewController>
                <placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
            </objects>
            <point key="canvasLocation" x="52" y="374.66266866566718"/>
        </scene>
    </scenes>
    <resources>
        <image name="Heart Control" width="500" height="500"/>
    </resources>
</document>


================================================
FILE: Heart Control/Base.lproj/Main.storyboard
================================================
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="11129.15" systemVersion="15F34" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="BYZ-38-t0r">
    <dependencies>
        <deployment identifier="iOS"/>
        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11103.10"/>
        <capability name="Constraints to layout margins" minToolsVersion="6.0"/>
        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
    </dependencies>
    <scenes>
        <!--View Controller-->
        <scene sceneID="tne-QT-ifu">
            <objects>
                <viewController id="BYZ-38-t0r" customClass="ViewController" customModule="Heart_Control" customModuleProvider="target" sceneMemberID="viewController">
                    <layoutGuides>
                        <viewControllerLayoutGuide type="top" id="y3c-jy-aDJ"/>
                        <viewControllerLayoutGuide type="bottom" id="wfy-db-euE"/>
                    </layoutGuides>
                    <view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
                        <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
                        <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                        <subviews>
                            <imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="Heart Control" translatesAutoresizingMaskIntoConstraints="NO" id="ODf-dh-ipx"/>
                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Open the app on your watch and measure your heart rate, continuously." textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="10" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="qfG-Lo-oms">
                                <fontDescription key="fontDescription" type="system" weight="medium" pointSize="17"/>
                                <color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
                                <nil key="highlightedColor"/>
                            </label>
                        </subviews>
                        <color key="backgroundColor" red="0.76078431372549016" green="0.82352941176470584" blue="0.8784313725490196" alpha="1" colorSpace="calibratedRGB"/>
                        <constraints>
                            <constraint firstItem="ODf-dh-ipx" firstAttribute="centerX" secondItem="8bC-Xf-vdC" secondAttribute="centerX" id="5jh-s2-3jC"/>
                            <constraint firstAttribute="trailing" secondItem="ODf-dh-ipx" secondAttribute="trailing" constant="90" id="A6H-dq-ewK"/>
                            <constraint firstItem="qfG-Lo-oms" firstAttribute="trailing" secondItem="8bC-Xf-vdC" secondAttribute="trailingMargin" id="AVh-1y-8WM"/>
                            <constraint firstItem="ODf-dh-ipx" firstAttribute="centerY" secondItem="8bC-Xf-vdC" secondAttribute="centerY" id="BsD-g9-leV"/>
                            <constraint firstItem="qfG-Lo-oms" firstAttribute="top" secondItem="ODf-dh-ipx" secondAttribute="bottom" constant="-402" id="Ftl-YW-x5x"/>
                            <constraint firstItem="qfG-Lo-oms" firstAttribute="leading" secondItem="8bC-Xf-vdC" secondAttribute="leadingMargin" id="LAP-yv-fVI"/>
                            <constraint firstItem="ODf-dh-ipx" firstAttribute="leading" secondItem="8bC-Xf-vdC" secondAttribute="leading" constant="90" id="jeT-CS-j06"/>
                        </constraints>
                    </view>
                </viewController>
                <placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
            </objects>
            <point key="canvasLocation" x="24.800000000000001" y="34.632683658170919"/>
        </scene>
    </scenes>
    <resources>
        <image name="Heart Control" width="500" height="500"/>
    </resources>
</document>


================================================
FILE: Heart Control/Heart Control.entitlements
================================================
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>com.apple.developer.healthkit</key>
	<true/>
</dict>
</plist>


================================================
FILE: Heart Control/Info.plist
================================================
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>CFBundleDevelopmentRegion</key>
	<string>en</string>
	<key>CFBundleExecutable</key>
	<string>$(EXECUTABLE_NAME)</string>
	<key>CFBundleIdentifier</key>
	<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
	<key>CFBundleInfoDictionaryVersion</key>
	<string>6.0</string>
	<key>CFBundleName</key>
	<string>$(PRODUCT_NAME)</string>
	<key>CFBundlePackageType</key>
	<string>APPL</string>
	<key>CFBundleShortVersionString</key>
	<string>1.0</string>
	<key>CFBundleSignature</key>
	<string>????</string>
	<key>CFBundleVersion</key>
	<string>1</string>
	<key>LSRequiresIPhoneOS</key>
	<true/>
	<key>UILaunchStoryboardName</key>
	<string>LaunchScreen</string>
	<key>UIMainStoryboardFile</key>
	<string>Main</string>
	<key>UIRequiredDeviceCapabilities</key>
	<array>
		<string>armv7</string>
		<string>healthkit</string>
	</array>
	<key>UISupportedInterfaceOrientations</key>
	<array>
		<string>UIInterfaceOrientationPortrait</string>
	</array>
    <key>NSHealthShareUsageDescription</key>
    <string>Read your Heart Rate and present it on your Apple Watch.</string>
</dict>
</plist>


================================================
FILE: Heart Control/ViewController.swift
================================================
//
//  ViewController.swift
//  Heart Control
//
//  Created by Thomas Paul Mann on 01/08/16.
//  Copyright © 2016 Thomas Paul Mann. All rights reserved.
//

import UIKit

class ViewController: UIViewController {

    override func viewDidLoad() {
        super.viewDidLoad()
        // Do any additional setup after loading the view, typically from a nib.
    }

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }

}



================================================
FILE: Heart Control WatchKit App/Assets.xcassets/AppIcon.appiconset/Contents.json
================================================
{
  "images" : [
    {
      "size" : "29x29",
      "idiom" : "iphone",
      "filename" : "Icon-29@2x.png",
      "scale" : "2x"
    },
    {
      "size" : "24x24",
      "idiom" : "watch",
      "filename" : "Icon-24@2x.png",
      "scale" : "2x",
      "role" : "notificationCenter",
      "subtype" : "38mm"
    },
    {
      "size" : "27.5x27.5",
      "idiom" : "watch",
      "filename" : "Icon-27.5@2x.png",
      "scale" : "2x",
      "role" : "notificationCenter",
      "subtype" : "42mm"
    },
    {
      "size" : "29x29",
      "idiom" : "watch",
      "role" : "companionSettings",
      "scale" : "2x"
    },
    {
      "size" : "29x29",
      "idiom" : "watch",
      "filename" : "Icon-29@3x.png",
      "role" : "companionSettings",
      "scale" : "3x"
    },
    {
      "size" : "40x40",
      "idiom" : "watch",
      "filename" : "Icon-40@2x.png",
      "scale" : "2x",
      "role" : "appLauncher",
      "subtype" : "38mm"
    },
    {
      "size" : "44x44",
      "idiom" : "watch",
      "filename" : "Icon-44@2x.png",
      "scale" : "2x",
      "role" : "longLook",
      "subtype" : "42mm"
    },
    {
      "size" : "86x86",
      "idiom" : "watch",
      "filename" : "Icon-86@2x.png",
      "scale" : "2x",
      "role" : "quickLook",
      "subtype" : "38mm"
    },
    {
      "size" : "98x98",
      "idiom" : "watch",
      "filename" : "Icon-98@2x.png",
      "scale" : "2x",
      "role" : "quickLook",
      "subtype" : "42mm"
    }
  ],
  "info" : {
    "version" : 1,
    "author" : "xcode"
  }
}

================================================
FILE: Heart Control WatchKit App/Base.lproj/Interface.storyboard
================================================
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder.WatchKit.Storyboard" version="3.0" toolsVersion="11129.15" systemVersion="15F34" targetRuntime="watchKit" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="AgC-eL-Hgc">
    <dependencies>
        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11103.10"/>
        <plugIn identifier="com.apple.InterfaceBuilder.IBWatchKitPlugin" version="11055.6"/>
    </dependencies>
    <scenes>
        <!--Heart Control-->
        <scene sceneID="aou-V4-d1y">
            <objects>
                <controller title="Heart Control" id="AgC-eL-Hgc" customClass="InterfaceController" customModule="Heart_Control_WatchKit_App" customModuleProvider="target">
                    <items>
                        <group width="1" alignment="right" spacing="5" id="Omy-g0-taR">
                            <items>
                                <label alignment="right" text="--" textAlignment="center" id="q60-id-Pm7">
                                    <accessibilityTraits key="accessibilityTraits" staticText="YES" notEnabled="YES"/>
                                    <color key="textColor" red="1" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
                                    <fontDescription key="font" type="system" weight="medium" pointSize="60"/>
                                </label>
                                <label alignment="right" text="BPM" id="vo6-Km-Myq">
                                    <accessibilityTraits key="accessibilityTraits" staticText="YES" notEnabled="YES"/>
                                </label>
                            </items>
                        </group>
                        <button width="1" alignment="center" title="Start" id="iNm-FD-Dqu">
                            <connections>
                                <action selector="didTapButton" destination="AgC-eL-Hgc" id="Gdw-ou-Tb4"/>
                            </connections>
                        </button>
                    </items>
                    <connections>
                        <outlet property="controlButton" destination="iNm-FD-Dqu" id="eMe-9U-iM4"/>
                        <outlet property="heartRateLabel" destination="q60-id-Pm7" id="gxC-k9-Omc"/>
                    </connections>
                </controller>
            </objects>
            <point key="canvasLocation" x="34" y="50"/>
        </scene>
    </scenes>
    <color key="tintColor" red="1" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
</document>


================================================
FILE: Heart Control WatchKit App/Info.plist
================================================
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>CFBundleDevelopmentRegion</key>
	<string>en</string>
	<key>CFBundleDisplayName</key>
	<string>Heart Control</string>
	<key>CFBundleExecutable</key>
	<string>$(EXECUTABLE_NAME)</string>
	<key>CFBundleIdentifier</key>
	<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
	<key>CFBundleInfoDictionaryVersion</key>
	<string>6.0</string>
	<key>CFBundleName</key>
	<string>$(PRODUCT_NAME)</string>
	<key>CFBundlePackageType</key>
	<string>APPL</string>
	<key>CFBundleShortVersionString</key>
	<string>1.0</string>
	<key>CFBundleSignature</key>
	<string>????</string>
	<key>CFBundleVersion</key>
	<string>1</string>
	<key>UISupportedInterfaceOrientations</key>
	<array>
		<string>UIInterfaceOrientationPortrait</string>
		<string>UIInterfaceOrientationPortraitUpsideDown</string>
	</array>
	<key>WKCompanionAppBundleIdentifier</key>
	<string>com.thomaspaulmann.Heart-Control</string>
	<key>WKWatchKitApp</key>
	<true/>
</dict>
</plist>


================================================
FILE: Heart Control WatchKit Extension/Assets.xcassets/Complication.complicationset/Circular.imageset/Contents.json
================================================
{
  "images" : [
    {
      "idiom" : "watch",
      "scale" : "2x"
    },
    {
      "idiom" : "watch",
      "scale" : "2x",
      "screen-width" : "<=145"
    },
    {
      "idiom" : "watch",
      "scale" : "2x",
      "screen-width" : ">145"
    }
  ],
  "info" : {
    "version" : 1,
    "author" : "xcode"
  }
}

================================================
FILE: Heart Control WatchKit Extension/Assets.xcassets/Complication.complicationset/Contents.json
================================================
{
  "assets" : [
    {
      "idiom" : "watch",
      "filename" : "Circular.imageset",
      "role" : "circular"
    },
    {
      "idiom" : "watch",
      "filename" : "Modular.imageset",
      "role" : "modular"
    },
    {
      "idiom" : "watch",
      "filename" : "Utilitarian.imageset",
      "role" : "utilitarian"
    }
  ],
  "info" : {
    "version" : 1,
    "author" : "xcode"
  }
}

================================================
FILE: Heart Control WatchKit Extension/Assets.xcassets/Complication.complicationset/Modular.imageset/Contents.json
================================================
{
  "images" : [
    {
      "idiom" : "watch",
      "scale" : "2x"
    },
    {
      "idiom" : "watch",
      "scale" : "2x",
      "screen-width" : "<=145"
    },
    {
      "idiom" : "watch",
      "scale" : "2x",
      "screen-width" : ">145"
    }
  ],
  "info" : {
    "version" : 1,
    "author" : "xcode"
  }
}

================================================
FILE: Heart Control WatchKit Extension/Assets.xcassets/Complication.complicationset/Utilitarian.imageset/Contents.json
================================================
{
  "images" : [
    {
      "idiom" : "watch",
      "scale" : "2x"
    },
    {
      "idiom" : "watch",
      "scale" : "2x",
      "screen-width" : "<=145"
    },
    {
      "idiom" : "watch",
      "scale" : "2x",
      "screen-width" : ">145"
    }
  ],
  "info" : {
    "version" : 1,
    "author" : "xcode"
  }
}

================================================
FILE: Heart Control WatchKit Extension/AuthorizationManger.swift
================================================
//
//  HKAuthorizationManger.swift
//  Heart Control
//
//  Created by Thomas Paul Mann on 07/08/16.
//  Copyright © 2016 Thomas Paul Mann. All rights reserved.
//

import HealthKit

class AuthorizationManager {

    static func requestAuthorization(completionHandler: ((_ success: Bool) -> Void)) {
        // Create health store.
        let healthStore = HKHealthStore()

        // Check if there is health data available.
        if (!HKHealthStore.isHealthDataAvailable()) {
            print("No health data is available.")
            completionHandler(false)
            return
        }

        // Create quantity type for heart rate.
        guard let heartRateQuantityType = HKQuantityType.quantityType(forIdentifier: .heartRate) else {
            print("Unable to create quantity type for heart rate.")
            completionHandler(false)
            return
        }

        // Request authorization to read heart rate data.
        healthStore.requestAuthorization(toShare: nil, read: [heartRateQuantityType]) { (success, error) -> Void in
            // If there is an error, do nothing.
            guard error == nil else {
                print(error)
                completionHandler(false)
                return
            }

            // Delegate success.
            completionHandler(success)
        }
    }

}


================================================
FILE: Heart Control WatchKit Extension/ExtensionDelegate.swift
================================================
//
//  ExtensionDelegate.swift
//  Heart Control WatchKit Extension
//
//  Created by Thomas Paul Mann on 01/08/16.
//  Copyright © 2016 Thomas Paul Mann. All rights reserved.
//

import WatchKit

class ExtensionDelegate: NSObject, WKExtensionDelegate {

    func applicationDidFinishLaunching() {
        // Perform any final initialization of your application.
    }

    func applicationDidBecomeActive() {
        // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
    }

    func applicationWillResignActive() {
        // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
        // Use this method to pause ongoing tasks, disable timers, etc.
    }

    func handle(_ backgroundTasks: Set<WKRefreshBackgroundTask>) {
        // Sent when the system needs to launch the application in the background to process tasks. Tasks arrive in a set, so loop through and process each one.
        backgroundTasks.forEach { (task) in
            // Process the background task
            
            // Be sure to complete each task when finished processing.
            task.setTaskCompleted()
        }
    }

}


================================================
FILE: Heart Control WatchKit Extension/HKUnit+BeatsPerMinute.swift
================================================
//
//  HKUnit+BeatsPerMinute.swift
//  Heart Control
//
//  Created by Thomas Paul Mann on 01/08/16.
//  Copyright © 2016 Thomas Paul Mann. All rights reserved.
//

import HealthKit

extension HKUnit {

    static func beatsPerMinute() -> HKUnit {
        return HKUnit.count().unitDivided(by: HKUnit.minute())
    }
    
}


================================================
FILE: Heart Control WatchKit Extension/Heart Control WatchKit Extension.entitlements
================================================
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>com.apple.developer.healthkit</key>
	<true/>
</dict>
</plist>


================================================
FILE: Heart Control WatchKit Extension/HeartRate.swift
================================================
//
//  HeartRate.swift
//  Heart Control
//
//  Created by Thomas Paul Mann on 07/08/16.
//  Copyright © 2016 Thomas Paul Mann. All rights reserved.
//

import Foundation

struct HeartRate {

    let timestamp: Date
    let bpm: Double
    
}


================================================
FILE: Heart Control WatchKit Extension/HeartRateManager.swift
================================================
//
//  HeartRateManager.swift
//  Heart Control
//
//  Created by Thomas Paul Mann on 01/08/16.
//  Copyright © 2016 Thomas Paul Mann. All rights reserved.
//

import HealthKit

typealias HKQueryUpdateHandler = ((HKAnchoredObjectQuery, [HKSample]?, [HKDeletedObject]?, HKQueryAnchor?, Error?) -> Swift.Void)

protocol HeartRateManagerDelegate: class {

    func heartRate(didChangeTo newHeartRate: HeartRate)

}

class HeartRateManager {

    // MARK: - Properties

    private let healthStore = HKHealthStore()

    weak var delegate: HeartRateManagerDelegate?

    private var activeQueries = [HKQuery]()

    // MARK: - Initialization

    init() {
        // Request authorization to read heart rate data.
        AuthorizationManager.requestAuthorization { (success) in
            // TODO: Export error.
            print(success)
        }
    }

    // MARK: - Public API

    func start() {
        // Configure heart rate quantity type.
        guard let quantityType = HKObjectType.quantityType(forIdentifier: .heartRate) else { return }

        // Create query to receive continiuous heart rate samples.
        let datePredicate = HKQuery.predicateForSamples(withStart: Date(), end: nil, options: .strictStartDate)
        let devicePredicate = HKQuery.predicateForObjects(from: [HKDevice.local()])
        let queryPredicate = NSCompoundPredicate(andPredicateWithSubpredicates:[datePredicate, devicePredicate])
        let updateHandler: HKQueryUpdateHandler = { [weak self] query, samples, deletedObjects, queryAnchor, error in
            if let quantitySamples = samples as? [HKQuantitySample] {
                self?.process(samples: quantitySamples)
            }
        }
        let query = HKAnchoredObjectQuery(type: quantityType,
                                          predicate: queryPredicate,
                                          anchor: nil,
                                          limit: HKObjectQueryNoLimit,
                                          resultsHandler: updateHandler)
        query.updateHandler = updateHandler

        // Execute the heart rate query.
        healthStore.execute(query)

        // Remember all active Queries to stop them later.
        activeQueries.append(query)
    }

    func stop() {
        // Stop all active queries.
        activeQueries.forEach { healthStore.stop($0) }
        activeQueries.removeAll()
    }

    // MARK: - Process

    private func process(samples: [HKQuantitySample]) {
        // Process every single sample.
        samples.forEach { process(sample: $0) }
    }

    private func process(sample: HKQuantitySample) {
        // If sample is not a heart rate sample, then do nothing.
        if (sample.quantityType != HKObjectType.quantityType(forIdentifier: .heartRate)) {
            return
        }

        // If sample is not compatible with beats per minute, then do nothing.
        if (!sample.quantity.is(compatibleWith: HKUnit.beatsPerMinute())) {
            return
        }

        // Extract information from sample.
        let timestamp = sample.endDate
        let count = sample.quantity.doubleValue(for: .beatsPerMinute())

        // Delegate new heart rate.
        let newHeartRate = HeartRate(timestamp: timestamp, bpm: count)
        delegate?.heartRate(didChangeTo: newHeartRate)
    }


}


================================================
FILE: Heart Control WatchKit Extension/Info.plist
================================================
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>CFBundleDevelopmentRegion</key>
	<string>en</string>
	<key>CFBundleDisplayName</key>
	<string>Heart Control WatchKit Extension</string>
	<key>CFBundleExecutable</key>
	<string>$(EXECUTABLE_NAME)</string>
	<key>CFBundleIdentifier</key>
	<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
	<key>CFBundleInfoDictionaryVersion</key>
	<string>6.0</string>
	<key>CFBundleName</key>
	<string>$(PRODUCT_NAME)</string>
	<key>CFBundlePackageType</key>
	<string>XPC!</string>
	<key>CFBundleShortVersionString</key>
	<string>1.0</string>
	<key>CFBundleSignature</key>
	<string>????</string>
	<key>CFBundleVersion</key>
	<string>1</string>
	<key>NSExtension</key>
	<dict>
		<key>NSExtensionAttributes</key>
		<dict>
			<key>WKAppBundleIdentifier</key>
			<string>com.thomaspaulmann.Heart-Control.watchkitapp</string>
		</dict>
		<key>NSExtensionPointIdentifier</key>
		<string>com.apple.watchkit</string>
	</dict>
	<key>UIRequiredDeviceCapabilities</key>
	<array>
		<string>healthkit</string>
	</array>
	<key>WKBackgroundModes</key>
	<array>
		<string>workout-processing</string>
	</array>
	<key>WKExtensionDelegateClassName</key>
	<string>$(PRODUCT_MODULE_NAME).ExtensionDelegate</string>
</dict>
</plist>


================================================
FILE: Heart Control WatchKit Extension/InterfaceController.swift
================================================
//
//  InterfaceController.swift
//  Heart Control WatchKit Extension
//
//  Created by Thomas Paul Mann on 01/08/16.
//  Copyright © 2016 Thomas Paul Mann. All rights reserved.
//

import WatchKit

class InterfaceController: WKInterfaceController {

    // MARK: - Outlets

    @IBOutlet var heartRateLabel: WKInterfaceLabel!
    @IBOutlet var controlButton: WKInterfaceButton!

    // MARK: - Properties

    private let workoutManager = WorkoutManager()

    // MARK: - Lifecycle

    override func willActivate() {
        super.willActivate()

        // Configure workout manager.
        workoutManager.delegate = self
    }

    // MARK: - Actions

    @IBAction func didTapButton() {
        switch workoutManager.state {
        case .started:
            // Stop current workout.
            workoutManager.stop()
            break
        case .stopped:
            // Start new workout.
            workoutManager.start()
            break
        }
    }

}

// MARK: - Workout Manager Delegate

extension InterfaceController: WorkoutManagerDelegate {

    func workoutManager(_ manager: WorkoutManager, didChangeStateTo newState: WorkoutState) {
        // Update title of control button.
        controlButton.setTitle(newState.actionText())
    }

    func workoutManager(_ manager: WorkoutManager, didChangeHeartRateTo newHeartRate: HeartRate) {
        // Update heart rate label.
        heartRateLabel.setText(String(format: "%.0f", newHeartRate.bpm))
    }

}


================================================
FILE: Heart Control WatchKit Extension/WorkoutManager.swift
================================================
//
//  WorkoutManager.swift
//  Heart Control
//
//  Created by Thomas Paul Mann on 01/08/16.
//  Copyright © 2016 Thomas Paul Mann. All rights reserved.
//

import HealthKit

enum WorkoutState {

    case started, stopped

}

extension WorkoutState {

    func actionText() -> String {
        switch self {
        case .started:
            return "Stop"
        case .stopped:
            return "Start"
        }
    }
    
}

protocol WorkoutManagerDelegate: class {

    func workoutManager(_ manager: WorkoutManager, didChangeStateTo newState: WorkoutState)
    func workoutManager(_ manager: WorkoutManager, didChangeHeartRateTo newHeartRate: HeartRate)

}

class WorkoutManager: NSObject {

    // MARK: - Properties

    private let healthStore = HKHealthStore()
    fileprivate let heartRateManager = HeartRateManager()

    weak var delegate: WorkoutManagerDelegate?

    private(set) var state: WorkoutState = .stopped

    private var session: HKWorkoutSession?

    // MARK: - Initialization

    override init() {
        super.init()

        // Configure heart rate manager.
        heartRateManager.delegate = self
    }

    // MARK: - Public API

    func start() {
        // If we have already started the workout, then do nothing.
        if (session != nil) {
            // Another workout is running.
            return
        }

        // Configure the workout session.
        let workoutConfiguration = HKWorkoutConfiguration()
        workoutConfiguration.activityType = .other
        workoutConfiguration.locationType = .indoor

        // Create workout session.
        do {
            session = try HKWorkoutSession(configuration: workoutConfiguration)
            session!.delegate = self
        } catch {
            fatalError("Unable to create Workout Session!")
        }

        // Start workout session.
        healthStore.start(session!)

        // Update state to started and inform delegates.
        state = .started
        delegate?.workoutManager(self, didChangeStateTo: state)
    }

    func stop() {
        // If we have already stopped the workout, then do nothing.
        if (session == nil) {
            return
        }

        // Stop querying heart rate.
        heartRateManager.stop()

        // Stop the workout session.
        healthStore.end(session!)

        // Clear the workout session.
        session = nil

        // Update state to stopped and inform delegates.
        state = .stopped
        delegate?.workoutManager(self, didChangeStateTo: state)
    }

}

// MARK: - Workout Session Delegate

extension WorkoutManager: HKWorkoutSessionDelegate {

    func workoutSession(_ workoutSession: HKWorkoutSession, didChangeTo toState: HKWorkoutSessionState, from fromState: HKWorkoutSessionState, date: Date) {
        switch toState {
        case .running:
            if fromState == .notStarted {
                heartRateManager.start()
            }

        default:
            break
        }
    }

    func workoutSession(_ workoutSession: HKWorkoutSession, didFailWithError error: Error) {
        fatalError(error.localizedDescription)
    }

    func workoutSession(_ workoutSession: HKWorkoutSession, didGenerate event: HKWorkoutEvent) {
        print("Did generate \(event)")
    }
    
}

// MARK: - Heart Rate Delegate

extension WorkoutManager: HeartRateManagerDelegate {

    func heartRate(didChangeTo newHeartRate: HeartRate) {
        delegate?.workoutManager(self, didChangeHeartRateTo: newHeartRate)
    }

}


================================================
FILE: Heart Control.xcodeproj/project.pbxproj
================================================
// !$*UTF8*$!
{
	archiveVersion = 1;
	classes = {
	};
	objectVersion = 46;
	objects = {

/* Begin PBXBuildFile section */
		BE25AFEB1D4F33B100DAF094 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = BE25AFEA1D4F33B100DAF094 /* AppDelegate.swift */; };
		BE25AFED1D4F33B100DAF094 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = BE25AFEC1D4F33B100DAF094 /* ViewController.swift */; };
		BE25AFF01D4F33B100DAF094 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = BE25AFEE1D4F33B100DAF094 /* Main.storyboard */; };
		BE25AFF21D4F33B100DAF094 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = BE25AFF11D4F33B100DAF094 /* Assets.xcassets */; };
		BE25AFF51D4F33B100DAF094 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = BE25AFF31D4F33B100DAF094 /* LaunchScreen.storyboard */; };
		BE25AFFA1D4F33B100DAF094 /* Heart Control WatchKit App.app in Embed Watch Content */ = {isa = PBXBuildFile; fileRef = BE25AFF91D4F33B100DAF094 /* Heart Control WatchKit App.app */; };
		BE25B0001D4F33B100DAF094 /* Interface.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = BE25AFFE1D4F33B100DAF094 /* Interface.storyboard */; };
		BE25B0021D4F33B100DAF094 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = BE25B0011D4F33B100DAF094 /* Assets.xcassets */; };
		BE25B0091D4F33B100DAF094 /* Heart Control WatchKit Extension.appex in Embed App Extensions */ = {isa = PBXBuildFile; fileRef = BE25B0081D4F33B100DAF094 /* Heart Control WatchKit Extension.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; };
		BE25B00E1D4F33B100DAF094 /* InterfaceController.swift in Sources */ = {isa = PBXBuildFile; fileRef = BE25B00D1D4F33B100DAF094 /* InterfaceController.swift */; };
		BE25B0101D4F33B100DAF094 /* ExtensionDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = BE25B00F1D4F33B100DAF094 /* ExtensionDelegate.swift */; };
		BE25B0121D4F33B100DAF094 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = BE25B0111D4F33B100DAF094 /* Assets.xcassets */; };
		BE3FDBDC1D576B8D009165A8 /* HeartRate.swift in Sources */ = {isa = PBXBuildFile; fileRef = BE3FDBDB1D576B8D009165A8 /* HeartRate.swift */; };
		BE496A231D4F4D9A00C82C4F /* WorkoutManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = BE496A221D4F4D9A00C82C4F /* WorkoutManager.swift */; };
		BE5AEE171D4F7CED0027C49C /* HKUnit+BeatsPerMinute.swift in Sources */ = {isa = PBXBuildFile; fileRef = BE5AEE161D4F7CED0027C49C /* HKUnit+BeatsPerMinute.swift */; };
		BE7070091D57A13D00E41B95 /* HealthKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BE7070081D57A13D00E41B95 /* HealthKit.framework */; };
		BE70700B1D57A14300E41B95 /* HealthKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BE70700A1D57A14300E41B95 /* HealthKit.framework */; };
		BE70700D1D57A29500E41B95 /* AuthorizationManger.swift in Sources */ = {isa = PBXBuildFile; fileRef = BE70700C1D57A29500E41B95 /* AuthorizationManger.swift */; };
		BEB5C5BB1D4F656D00BBF490 /* HeartRateManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = BEB5C5BA1D4F656D00BBF490 /* HeartRateManager.swift */; };
/* End PBXBuildFile section */

/* Begin PBXContainerItemProxy section */
		BE25AFFB1D4F33B100DAF094 /* PBXContainerItemProxy */ = {
			isa = PBXContainerItemProxy;
			containerPortal = BE25AFDF1D4F33B000DAF094 /* Project object */;
			proxyType = 1;
			remoteGlobalIDString = BE25AFF81D4F33B100DAF094;
			remoteInfo = "Heart Control WatchKit App";
		};
		BE25B00A1D4F33B100DAF094 /* PBXContainerItemProxy */ = {
			isa = PBXContainerItemProxy;
			containerPortal = BE25AFDF1D4F33B000DAF094 /* Project object */;
			proxyType = 1;
			remoteGlobalIDString = BE25B0071D4F33B100DAF094;
			remoteInfo = "Heart Control WatchKit Extension";
		};
/* End PBXContainerItemProxy section */

/* Begin PBXCopyFilesBuildPhase section */
		BE25B0191D4F33B100DAF094 /* Embed App Extensions */ = {
			isa = PBXCopyFilesBuildPhase;
			buildActionMask = 2147483647;
			dstPath = "";
			dstSubfolderSpec = 13;
			files = (
				BE25B0091D4F33B100DAF094 /* Heart Control WatchKit Extension.appex in Embed App Extensions */,
			);
			name = "Embed App Extensions";
			runOnlyForDeploymentPostprocessing = 0;
		};
		BE25B01D1D4F33B100DAF094 /* Embed Watch Content */ = {
			isa = PBXCopyFilesBuildPhase;
			buildActionMask = 2147483647;
			dstPath = "$(CONTENTS_FOLDER_PATH)/Watch";
			dstSubfolderSpec = 16;
			files = (
				BE25AFFA1D4F33B100DAF094 /* Heart Control WatchKit App.app in Embed Watch Content */,
			);
			name = "Embed Watch Content";
			runOnlyForDeploymentPostprocessing = 0;
		};
/* End PBXCopyFilesBuildPhase section */

/* Begin PBXFileReference section */
		BE25AFE71D4F33B100DAF094 /* Heart Control.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Heart Control.app"; sourceTree = BUILT_PRODUCTS_DIR; };
		BE25AFEA1D4F33B100DAF094 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
		BE25AFEC1D4F33B100DAF094 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = "<group>"; };
		BE25AFEF1D4F33B100DAF094 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
		BE25AFF11D4F33B100DAF094 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
		BE25AFF41D4F33B100DAF094 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
		BE25AFF61D4F33B100DAF094 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
		BE25AFF91D4F33B100DAF094 /* Heart Control WatchKit App.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Heart Control WatchKit App.app"; sourceTree = BUILT_PRODUCTS_DIR; };
		BE25AFFF1D4F33B100DAF094 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Interface.storyboard; sourceTree = "<group>"; };
		BE25B0011D4F33B100DAF094 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
		BE25B0031D4F33B100DAF094 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
		BE25B0081D4F33B100DAF094 /* Heart Control WatchKit Extension.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = "Heart Control WatchKit Extension.appex"; sourceTree = BUILT_PRODUCTS_DIR; };
		BE25B00D1D4F33B100DAF094 /* InterfaceController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InterfaceController.swift; sourceTree = "<group>"; };
		BE25B00F1D4F33B100DAF094 /* ExtensionDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ExtensionDelegate.swift; sourceTree = "<group>"; };
		BE25B0111D4F33B100DAF094 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
		BE25B0131D4F33B100DAF094 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
		BE3FDBDB1D576B8D009165A8 /* HeartRate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HeartRate.swift; sourceTree = "<group>"; };
		BE496A1C1D4F467100C82C4F /* Heart Control WatchKit Extension.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = "Heart Control WatchKit Extension.entitlements"; sourceTree = "<group>"; };
		BE496A1D1D4F467900C82C4F /* Heart Control.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = "Heart Control.entitlements"; sourceTree = "<group>"; };
		BE496A221D4F4D9A00C82C4F /* WorkoutManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WorkoutManager.swift; sourceTree = "<group>"; };
		BE5AEE161D4F7CED0027C49C /* HKUnit+BeatsPerMinute.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "HKUnit+BeatsPerMinute.swift"; sourceTree = "<group>"; };
		BE7070081D57A13D00E41B95 /* HealthKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = HealthKit.framework; path = System/Library/Frameworks/HealthKit.framework; sourceTree = SDKROOT; };
		BE70700A1D57A14300E41B95 /* HealthKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = HealthKit.framework; path = Platforms/WatchOS.platform/Developer/SDKs/WatchOS3.0.sdk/System/Library/Frameworks/HealthKit.framework; sourceTree = DEVELOPER_DIR; };
		BE70700C1D57A29500E41B95 /* AuthorizationManger.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AuthorizationManger.swift; sourceTree = "<group>"; };
		BEB5C5BA1D4F656D00BBF490 /* HeartRateManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HeartRateManager.swift; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
		BE25AFE41D4F33B000DAF094 /* Frameworks */ = {
			isa = PBXFrameworksBuildPhase;
			buildActionMask = 2147483647;
			files = (
				BE7070091D57A13D00E41B95 /* HealthKit.framework in Frameworks */,
			);
			runOnlyForDeploymentPostprocessing = 0;
		};
		BE25B0051D4F33B100DAF094 /* Frameworks */ = {
			isa = PBXFrameworksBuildPhase;
			buildActionMask = 2147483647;
			files = (
				BE70700B1D57A14300E41B95 /* HealthKit.framework in Frameworks */,
			);
			runOnlyForDeploymentPostprocessing = 0;
		};
/* End PBXFrameworksBuildPhase section */

/* Begin PBXGroup section */
		BE25AFDE1D4F33B000DAF094 = {
			isa = PBXGroup;
			children = (
				BE25AFE91D4F33B100DAF094 /* Heart Control */,
				BE25AFFD1D4F33B100DAF094 /* Heart Control WatchKit App */,
				BE25B00C1D4F33B100DAF094 /* Heart Control WatchKit Extension */,
				BE25AFE81D4F33B100DAF094 /* Products */,
				BE496A191D4F467100C82C4F /* Frameworks */,
			);
			sourceTree = "<group>";
		};
		BE25AFE81D4F33B100DAF094 /* Products */ = {
			isa = PBXGroup;
			children = (
				BE25AFE71D4F33B100DAF094 /* Heart Control.app */,
				BE25AFF91D4F33B100DAF094 /* Heart Control WatchKit App.app */,
				BE25B0081D4F33B100DAF094 /* Heart Control WatchKit Extension.appex */,
			);
			name = Products;
			sourceTree = "<group>";
		};
		BE25AFE91D4F33B100DAF094 /* Heart Control */ = {
			isa = PBXGroup;
			children = (
				BE3FDBDE1D576BC1009165A8 /* Supporting Files */,
				BE25AFEA1D4F33B100DAF094 /* AppDelegate.swift */,
				BE25AFEC1D4F33B100DAF094 /* ViewController.swift */,
				BE25AFEE1D4F33B100DAF094 /* Main.storyboard */,
				BE25AFF31D4F33B100DAF094 /* LaunchScreen.storyboard */,
			);
			path = "Heart Control";
			sourceTree = "<group>";
		};
		BE25AFFD1D4F33B100DAF094 /* Heart Control WatchKit App */ = {
			isa = PBXGroup;
			children = (
				BE3FDBDF1D578CFE009165A8 /* Supporting Files */,
				BE25AFFE1D4F33B100DAF094 /* Interface.storyboard */,
			);
			path = "Heart Control WatchKit App";
			sourceTree = "<group>";
		};
		BE25B00C1D4F33B100DAF094 /* Heart Control WatchKit Extension */ = {
			isa = PBXGroup;
			children = (
				BE3FDBDD1D576BB1009165A8 /* Supporting Files */,
				BE25B00D1D4F33B100DAF094 /* InterfaceController.swift */,
				BE25B00F1D4F33B100DAF094 /* ExtensionDelegate.swift */,
				BE496A221D4F4D9A00C82C4F /* WorkoutManager.swift */,
				BEB5C5BA1D4F656D00BBF490 /* HeartRateManager.swift */,
				BE70700C1D57A29500E41B95 /* AuthorizationManger.swift */,
				BE3FDBDB1D576B8D009165A8 /* HeartRate.swift */,
				BE5AEE161D4F7CED0027C49C /* HKUnit+BeatsPerMinute.swift */,
			);
			path = "Heart Control WatchKit Extension";
			sourceTree = "<group>";
		};
		BE3FDBDD1D576BB1009165A8 /* Supporting Files */ = {
			isa = PBXGroup;
			children = (
				BE496A1C1D4F467100C82C4F /* Heart Control WatchKit Extension.entitlements */,
				BE25B0111D4F33B100DAF094 /* Assets.xcassets */,
				BE25B0131D4F33B100DAF094 /* Info.plist */,
			);
			name = "Supporting Files";
			sourceTree = "<group>";
		};
		BE3FDBDE1D576BC1009165A8 /* Supporting Files */ = {
			isa = PBXGroup;
			children = (
				BE496A1D1D4F467900C82C4F /* Heart Control.entitlements */,
				BE25AFF11D4F33B100DAF094 /* Assets.xcassets */,
				BE25AFF61D4F33B100DAF094 /* Info.plist */,
			);
			name = "Supporting Files";
			sourceTree = "<group>";
		};
		BE3FDBDF1D578CFE009165A8 /* Supporting Files */ = {
			isa = PBXGroup;
			children = (
				BE25B0011D4F33B100DAF094 /* Assets.xcassets */,
				BE25B0031D4F33B100DAF094 /* Info.plist */,
			);
			name = "Supporting Files";
			sourceTree = "<group>";
		};
		BE496A191D4F467100C82C4F /* Frameworks */ = {
			isa = PBXGroup;
			children = (
				BE70700A1D57A14300E41B95 /* HealthKit.framework */,
				BE7070081D57A13D00E41B95 /* HealthKit.framework */,
			);
			name = Frameworks;
			sourceTree = "<group>";
		};
/* End PBXGroup section */

/* Begin PBXNativeTarget section */
		BE25AFE61D4F33B000DAF094 /* Heart Control */ = {
			isa = PBXNativeTarget;
			buildConfigurationList = BE25B01E1D4F33B100DAF094 /* Build configuration list for PBXNativeTarget "Heart Control" */;
			buildPhases = (
				BE25AFE31D4F33B000DAF094 /* Sources */,
				BE25AFE41D4F33B000DAF094 /* Frameworks */,
				BE25AFE51D4F33B000DAF094 /* Resources */,
				BE25B01D1D4F33B100DAF094 /* Embed Watch Content */,
			);
			buildRules = (
			);
			dependencies = (
				BE25AFFC1D4F33B100DAF094 /* PBXTargetDependency */,
			);
			name = "Heart Control";
			productName = "Heart Control";
			productReference = BE25AFE71D4F33B100DAF094 /* Heart Control.app */;
			productType = "com.apple.product-type.application";
		};
		BE25AFF81D4F33B100DAF094 /* Heart Control WatchKit App */ = {
			isa = PBXNativeTarget;
			buildConfigurationList = BE25B01A1D4F33B100DAF094 /* Build configuration list for PBXNativeTarget "Heart Control WatchKit App" */;
			buildPhases = (
				BE25AFF71D4F33B100DAF094 /* Resources */,
				BE25B0191D4F33B100DAF094 /* Embed App Extensions */,
			);
			buildRules = (
			);
			dependencies = (
				BE25B00B1D4F33B100DAF094 /* PBXTargetDependency */,
			);
			name = "Heart Control WatchKit App";
			productName = "Heart Control WatchKit App";
			productReference = BE25AFF91D4F33B100DAF094 /* Heart Control WatchKit App.app */;
			productType = "com.apple.product-type.application.watchapp2";
		};
		BE25B0071D4F33B100DAF094 /* Heart Control WatchKit Extension */ = {
			isa = PBXNativeTarget;
			buildConfigurationList = BE25B0161D4F33B100DAF094 /* Build configuration list for PBXNativeTarget "Heart Control WatchKit Extension" */;
			buildPhases = (
				BE25B0041D4F33B100DAF094 /* Sources */,
				BE25B0051D4F33B100DAF094 /* Frameworks */,
				BE25B0061D4F33B100DAF094 /* Resources */,
			);
			buildRules = (
			);
			dependencies = (
			);
			name = "Heart Control WatchKit Extension";
			productName = "Heart Control WatchKit Extension";
			productReference = BE25B0081D4F33B100DAF094 /* Heart Control WatchKit Extension.appex */;
			productType = "com.apple.product-type.watchkit2-extension";
		};
/* End PBXNativeTarget section */

/* Begin PBXProject section */
		BE25AFDF1D4F33B000DAF094 /* Project object */ = {
			isa = PBXProject;
			attributes = {
				LastSwiftUpdateCheck = 0800;
				LastUpgradeCheck = 0800;
				ORGANIZATIONNAME = "Thomas Paul Mann";
				TargetAttributes = {
					BE25AFE61D4F33B000DAF094 = {
						CreatedOnToolsVersion = 8.0;
						DevelopmentTeam = E6HN743D3A;
						DevelopmentTeamName = "Thomas Mann";
						ProvisioningStyle = Automatic;
						SystemCapabilities = {
							com.apple.HealthKit = {
								enabled = 1;
							};
						};
					};
					BE25AFF81D4F33B100DAF094 = {
						CreatedOnToolsVersion = 8.0;
						DevelopmentTeam = E6HN743D3A;
						DevelopmentTeamName = "Thomas Mann";
						ProvisioningStyle = Automatic;
					};
					BE25B0071D4F33B100DAF094 = {
						CreatedOnToolsVersion = 8.0;
						DevelopmentTeam = E6HN743D3A;
						DevelopmentTeamName = "Thomas Mann";
						ProvisioningStyle = Automatic;
						SystemCapabilities = {
							com.apple.HealthKit = {
								enabled = 1;
							};
							com.apple.HealthKit.watchos = {
								enabled = 1;
							};
						};
					};
				};
			};
			buildConfigurationList = BE25AFE21D4F33B000DAF094 /* Build configuration list for PBXProject "Heart Control" */;
			compatibilityVersion = "Xcode 3.2";
			developmentRegion = English;
			hasScannedForEncodings = 0;
			knownRegions = (
				en,
				Base,
			);
			mainGroup = BE25AFDE1D4F33B000DAF094;
			productRefGroup = BE25AFE81D4F33B100DAF094 /* Products */;
			projectDirPath = "";
			projectRoot = "";
			targets = (
				BE25AFE61D4F33B000DAF094 /* Heart Control */,
				BE25AFF81D4F33B100DAF094 /* Heart Control WatchKit App */,
				BE25B0071D4F33B100DAF094 /* Heart Control WatchKit Extension */,
			);
		};
/* End PBXProject section */

/* Begin PBXResourcesBuildPhase section */
		BE25AFE51D4F33B000DAF094 /* Resources */ = {
			isa = PBXResourcesBuildPhase;
			buildActionMask = 2147483647;
			files = (
				BE25AFF51D4F33B100DAF094 /* LaunchScreen.storyboard in Resources */,
				BE25AFF21D4F33B100DAF094 /* Assets.xcassets in Resources */,
				BE25AFF01D4F33B100DAF094 /* Main.storyboard in Resources */,
			);
			runOnlyForDeploymentPostprocessing = 0;
		};
		BE25AFF71D4F33B100DAF094 /* Resources */ = {
			isa = PBXResourcesBuildPhase;
			buildActionMask = 2147483647;
			files = (
				BE25B0021D4F33B100DAF094 /* Assets.xcassets in Resources */,
				BE25B0001D4F33B100DAF094 /* Interface.storyboard in Resources */,
			);
			runOnlyForDeploymentPostprocessing = 0;
		};
		BE25B0061D4F33B100DAF094 /* Resources */ = {
			isa = PBXResourcesBuildPhase;
			buildActionMask = 2147483647;
			files = (
				BE25B0121D4F33B100DAF094 /* Assets.xcassets in Resources */,
			);
			runOnlyForDeploymentPostprocessing = 0;
		};
/* End PBXResourcesBuildPhase section */

/* Begin PBXSourcesBuildPhase section */
		BE25AFE31D4F33B000DAF094 /* Sources */ = {
			isa = PBXSourcesBuildPhase;
			buildActionMask = 2147483647;
			files = (
				BE25AFED1D4F33B100DAF094 /* ViewController.swift in Sources */,
				BE25AFEB1D4F33B100DAF094 /* AppDelegate.swift in Sources */,
			);
			runOnlyForDeploymentPostprocessing = 0;
		};
		BE25B0041D4F33B100DAF094 /* Sources */ = {
			isa = PBXSourcesBuildPhase;
			buildActionMask = 2147483647;
			files = (
				BE25B0101D4F33B100DAF094 /* ExtensionDelegate.swift in Sources */,
				BE496A231D4F4D9A00C82C4F /* WorkoutManager.swift in Sources */,
				BE5AEE171D4F7CED0027C49C /* HKUnit+BeatsPerMinute.swift in Sources */,
				BE25B00E1D4F33B100DAF094 /* InterfaceController.swift in Sources */,
				BE3FDBDC1D576B8D009165A8 /* HeartRate.swift in Sources */,
				BE70700D1D57A29500E41B95 /* AuthorizationManger.swift in Sources */,
				BEB5C5BB1D4F656D00BBF490 /* HeartRateManager.swift in Sources */,
			);
			runOnlyForDeploymentPostprocessing = 0;
		};
/* End PBXSourcesBuildPhase section */

/* Begin PBXTargetDependency section */
		BE25AFFC1D4F33B100DAF094 /* PBXTargetDependency */ = {
			isa = PBXTargetDependency;
			target = BE25AFF81D4F33B100DAF094 /* Heart Control WatchKit App */;
			targetProxy = BE25AFFB1D4F33B100DAF094 /* PBXContainerItemProxy */;
		};
		BE25B00B1D4F33B100DAF094 /* PBXTargetDependency */ = {
			isa = PBXTargetDependency;
			target = BE25B0071D4F33B100DAF094 /* Heart Control WatchKit Extension */;
			targetProxy = BE25B00A1D4F33B100DAF094 /* PBXContainerItemProxy */;
		};
/* End PBXTargetDependency section */

/* Begin PBXVariantGroup section */
		BE25AFEE1D4F33B100DAF094 /* Main.storyboard */ = {
			isa = PBXVariantGroup;
			children = (
				BE25AFEF1D4F33B100DAF094 /* Base */,
			);
			name = Main.storyboard;
			sourceTree = "<group>";
		};
		BE25AFF31D4F33B100DAF094 /* LaunchScreen.storyboard */ = {
			isa = PBXVariantGroup;
			children = (
				BE25AFF41D4F33B100DAF094 /* Base */,
			);
			name = LaunchScreen.storyboard;
			sourceTree = "<group>";
		};
		BE25AFFE1D4F33B100DAF094 /* Interface.storyboard */ = {
			isa = PBXVariantGroup;
			children = (
				BE25AFFF1D4F33B100DAF094 /* Base */,
			);
			name = Interface.storyboard;
			sourceTree = "<group>";
		};
/* End PBXVariantGroup section */

/* Begin XCBuildConfiguration section */
		BE25B0141D4F33B100DAF094 /* Debug */ = {
			isa = XCBuildConfiguration;
			buildSettings = {
				ALWAYS_SEARCH_USER_PATHS = NO;
				CLANG_ANALYZER_NONNULL = YES;
				CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
				CLANG_CXX_LIBRARY = "libc++";
				CLANG_ENABLE_MODULES = YES;
				CLANG_ENABLE_OBJC_ARC = YES;
				CLANG_WARN_BOOL_CONVERSION = YES;
				CLANG_WARN_CONSTANT_CONVERSION = YES;
				CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
				CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
				CLANG_WARN_EMPTY_BODY = YES;
				CLANG_WARN_ENUM_CONVERSION = YES;
				CLANG_WARN_INT_CONVERSION = YES;
				CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
				CLANG_WARN_UNREACHABLE_CODE = YES;
				CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
				COPY_PHASE_STRIP = NO;
				DEBUG_INFORMATION_FORMAT = dwarf;
				ENABLE_STRICT_OBJC_MSGSEND = YES;
				ENABLE_TESTABILITY = YES;
				GCC_C_LANGUAGE_STANDARD = gnu99;
				GCC_DYNAMIC_NO_PIC = NO;
				GCC_NO_COMMON_BLOCKS = YES;
				GCC_OPTIMIZATION_LEVEL = 0;
				GCC_PREPROCESSOR_DEFINITIONS = (
					"DEBUG=1",
					"$(inherited)",
				);
				GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
				GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
				GCC_WARN_UNDECLARED_SELECTOR = YES;
				GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
				GCC_WARN_UNUSED_FUNCTION = YES;
				GCC_WARN_UNUSED_VARIABLE = YES;
				IPHONEOS_DEPLOYMENT_TARGET = 10.0;
				MTL_ENABLE_DEBUG_INFO = YES;
				ONLY_ACTIVE_ARCH = YES;
				SDKROOT = iphoneos;
				SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
				SWIFT_OPTIMIZATION_LEVEL = "-Onone";
			};
			name = Debug;
		};
		BE25B0151D4F33B100DAF094 /* Release */ = {
			isa = XCBuildConfiguration;
			buildSettings = {
				ALWAYS_SEARCH_USER_PATHS = NO;
				CLANG_ANALYZER_NONNULL = YES;
				CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
				CLANG_CXX_LIBRARY = "libc++";
				CLANG_ENABLE_MODULES = YES;
				CLANG_ENABLE_OBJC_ARC = YES;
				CLANG_WARN_BOOL_CONVERSION = YES;
				CLANG_WARN_CONSTANT_CONVERSION = YES;
				CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
				CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
				CLANG_WARN_EMPTY_BODY = YES;
				CLANG_WARN_ENUM_CONVERSION = YES;
				CLANG_WARN_INT_CONVERSION = YES;
				CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
				CLANG_WARN_UNREACHABLE_CODE = YES;
				CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
				COPY_PHASE_STRIP = NO;
				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
				ENABLE_NS_ASSERTIONS = NO;
				ENABLE_STRICT_OBJC_MSGSEND = YES;
				GCC_C_LANGUAGE_STANDARD = gnu99;
				GCC_NO_COMMON_BLOCKS = YES;
				GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
				GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
				GCC_WARN_UNDECLARED_SELECTOR = YES;
				GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
				GCC_WARN_UNUSED_FUNCTION = YES;
				GCC_WARN_UNUSED_VARIABLE = YES;
				IPHONEOS_DEPLOYMENT_TARGET = 10.0;
				MTL_ENABLE_DEBUG_INFO = NO;
				SDKROOT = iphoneos;
				SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
				VALIDATE_PRODUCT = YES;
			};
			name = Release;
		};
		BE25B0171D4F33B100DAF094 /* Debug */ = {
			isa = XCBuildConfiguration;
			buildSettings = {
				ASSETCATALOG_COMPILER_COMPLICATION_NAME = Complication;
				CODE_SIGN_ENTITLEMENTS = "Heart Control WatchKit Extension/Heart Control WatchKit Extension.entitlements";
				INFOPLIST_FILE = "Heart Control WatchKit Extension/Info.plist";
				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks";
				PRODUCT_BUNDLE_IDENTIFIER = "com.thomaspaulmann.Heart-Control.watchkitapp.watchkitextension";
				PRODUCT_NAME = "${TARGET_NAME}";
				SDKROOT = watchos;
				SKIP_INSTALL = YES;
				SWIFT_VERSION = 3.0;
				TARGETED_DEVICE_FAMILY = 4;
				WATCHOS_DEPLOYMENT_TARGET = 3.0;
			};
			name = Debug;
		};
		BE25B0181D4F33B100DAF094 /* Release */ = {
			isa = XCBuildConfiguration;
			buildSettings = {
				ASSETCATALOG_COMPILER_COMPLICATION_NAME = Complication;
				CODE_SIGN_ENTITLEMENTS = "Heart Control WatchKit Extension/Heart Control WatchKit Extension.entitlements";
				INFOPLIST_FILE = "Heart Control WatchKit Extension/Info.plist";
				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks";
				PRODUCT_BUNDLE_IDENTIFIER = "com.thomaspaulmann.Heart-Control.watchkitapp.watchkitextension";
				PRODUCT_NAME = "${TARGET_NAME}";
				SDKROOT = watchos;
				SKIP_INSTALL = YES;
				SWIFT_VERSION = 3.0;
				TARGETED_DEVICE_FAMILY = 4;
				WATCHOS_DEPLOYMENT_TARGET = 3.0;
			};
			name = Release;
		};
		BE25B01B1D4F33B100DAF094 /* Debug */ = {
			isa = XCBuildConfiguration;
			buildSettings = {
				ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
				IBSC_MODULE = Heart_Control_WatchKit_Extension;
				INFOPLIST_FILE = "Heart Control WatchKit App/Info.plist";
				PRODUCT_BUNDLE_IDENTIFIER = "com.thomaspaulmann.Heart-Control.watchkitapp";
				PRODUCT_NAME = "$(TARGET_NAME)";
				SDKROOT = watchos;
				SKIP_INSTALL = YES;
				SWIFT_VERSION = 3.0;
				TARGETED_DEVICE_FAMILY = 4;
				WATCHOS_DEPLOYMENT_TARGET = 3.0;
			};
			name = Debug;
		};
		BE25B01C1D4F33B100DAF094 /* Release */ = {
			isa = XCBuildConfiguration;
			buildSettings = {
				ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
				IBSC_MODULE = Heart_Control_WatchKit_Extension;
				INFOPLIST_FILE = "Heart Control WatchKit App/Info.plist";
				PRODUCT_BUNDLE_IDENTIFIER = "com.thomaspaulmann.Heart-Control.watchkitapp";
				PRODUCT_NAME = "$(TARGET_NAME)";
				SDKROOT = watchos;
				SKIP_INSTALL = YES;
				SWIFT_VERSION = 3.0;
				TARGETED_DEVICE_FAMILY = 4;
				WATCHOS_DEPLOYMENT_TARGET = 3.0;
			};
			name = Release;
		};
		BE25B01F1D4F33B100DAF094 /* Debug */ = {
			isa = XCBuildConfiguration;
			buildSettings = {
				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
				CODE_SIGN_ENTITLEMENTS = "Heart Control/Heart Control.entitlements";
				INFOPLIST_FILE = "Heart Control/Info.plist";
				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
				PRODUCT_BUNDLE_IDENTIFIER = "com.thomaspaulmann.Heart-Control";
				PRODUCT_NAME = "$(TARGET_NAME)";
				SWIFT_VERSION = 3.0;
			};
			name = Debug;
		};
		BE25B0201D4F33B100DAF094 /* Release */ = {
			isa = XCBuildConfiguration;
			buildSettings = {
				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
				CODE_SIGN_ENTITLEMENTS = "Heart Control/Heart Control.entitlements";
				INFOPLIST_FILE = "Heart Control/Info.plist";
				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
				PRODUCT_BUNDLE_IDENTIFIER = "com.thomaspaulmann.Heart-Control";
				PRODUCT_NAME = "$(TARGET_NAME)";
				SWIFT_VERSION = 3.0;
			};
			name = Release;
		};
/* End XCBuildConfiguration section */

/* Begin XCConfigurationList section */
		BE25AFE21D4F33B000DAF094 /* Build configuration list for PBXProject "Heart Control" */ = {
			isa = XCConfigurationList;
			buildConfigurations = (
				BE25B0141D4F33B100DAF094 /* Debug */,
				BE25B0151D4F33B100DAF094 /* Release */,
			);
			defaultConfigurationIsVisible = 0;
			defaultConfigurationName = Release;
		};
		BE25B0161D4F33B100DAF094 /* Build configuration list for PBXNativeTarget "Heart Control WatchKit Extension" */ = {
			isa = XCConfigurationList;
			buildConfigurations = (
				BE25B0171D4F33B100DAF094 /* Debug */,
				BE25B0181D4F33B100DAF094 /* Release */,
			);
			defaultConfigurationIsVisible = 0;
			defaultConfigurationName = Release;
		};
		BE25B01A1D4F33B100DAF094 /* Build configuration list for PBXNativeTarget "Heart Control WatchKit App" */ = {
			isa = XCConfigurationList;
			buildConfigurations = (
				BE25B01B1D4F33B100DAF094 /* Debug */,
				BE25B01C1D4F33B100DAF094 /* Release */,
			);
			defaultConfigurationIsVisible = 0;
			defaultConfigurationName = Release;
		};
		BE25B01E1D4F33B100DAF094 /* Build configuration list for PBXNativeTarget "Heart Control" */ = {
			isa = XCConfigurationList;
			buildConfigurations = (
				BE25B01F1D4F33B100DAF094 /* Debug */,
				BE25B0201D4F33B100DAF094 /* Release */,
			);
			defaultConfigurationIsVisible = 0;
			defaultConfigurationName = Release;
		};
/* End XCConfigurationList section */
	};
	rootObject = BE25AFDF1D4F33B000DAF094 /* Project object */;
}


================================================
FILE: Heart Control.xcodeproj/project.xcworkspace/contents.xcworkspacedata
================================================
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
   version = "1.0">
   <FileRef
      location = "self:Heart Control.xcodeproj">
   </FileRef>
</Workspace>


================================================
FILE: README.md
================================================
[![Swift](https://img.shields.io/badge/Swift-3.0-green.svg)](https://swift.org) [![watchOS](https://img.shields.io/badge/watchOS-3.0-green.svg)](https://developer.apple.com/watchos/)

# Heart Control

Monitor your heart rate on the apple watch - continuously and easy.

## What is it?

Heart Control is a standalone watch app to monitor continuously heart rate on [watchOS 3](http://www.apple.com/watchos-preview/). It collects and analyzes data in real-time in the background.

## What is it not?

It's not a whole implementation of every little detail of [Apple's HealthKit](https://developer.apple.com/healthkit/). It's more or less a quick start guide for workout apps on watchOS 3.

## Special Thanks

Thanks to [Dash Brittain](http://www.roxannebrittain.com) and [Jorge Morinigo](https://www.linkedin.com/in/jorgemorinigo) for your WWDC talk [Building Great Workout Apps](https://developer.apple.com/videos/play/wwdc2016/235/).
Download .txt
gitextract_yi781vpn/

├── .gitignore
├── Design/
│   └── heart-control.sketch
├── Heart Control/
│   ├── AppDelegate.swift
│   ├── Assets.xcassets/
│   │   ├── AppIcon.appiconset/
│   │   │   └── Contents.json
│   │   ├── Contents.json
│   │   └── Heart Control.imageset/
│   │       └── Contents.json
│   ├── Base.lproj/
│   │   ├── LaunchScreen.storyboard
│   │   └── Main.storyboard
│   ├── Heart Control.entitlements
│   ├── Info.plist
│   └── ViewController.swift
├── Heart Control WatchKit App/
│   ├── Assets.xcassets/
│   │   └── AppIcon.appiconset/
│   │       └── Contents.json
│   ├── Base.lproj/
│   │   └── Interface.storyboard
│   └── Info.plist
├── Heart Control WatchKit Extension/
│   ├── Assets.xcassets/
│   │   └── Complication.complicationset/
│   │       ├── Circular.imageset/
│   │       │   └── Contents.json
│   │       ├── Contents.json
│   │       ├── Modular.imageset/
│   │       │   └── Contents.json
│   │       └── Utilitarian.imageset/
│   │           └── Contents.json
│   ├── AuthorizationManger.swift
│   ├── ExtensionDelegate.swift
│   ├── HKUnit+BeatsPerMinute.swift
│   ├── Heart Control WatchKit Extension.entitlements
│   ├── HeartRate.swift
│   ├── HeartRateManager.swift
│   ├── Info.plist
│   ├── InterfaceController.swift
│   └── WorkoutManager.swift
├── Heart Control.xcodeproj/
│   ├── project.pbxproj
│   └── project.xcworkspace/
│       └── contents.xcworkspacedata
└── README.md
Condensed preview — 30 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (72K chars).
[
  {
    "path": ".gitignore",
    "chars": 331,
    "preview": "# Build generated\nbuild/\nDerivedData/\n\n# Various settings\n*.pbxuser\n!default.pbxuser\n*.mode1v3\n!default.mode1v3\n*.mode2v"
  },
  {
    "path": "Heart Control/AppDelegate.swift",
    "chars": 812,
    "preview": "//\n//  AppDelegate.swift\n//  Heart Control\n//\n//  Created by Thomas Paul Mann on 01/08/16.\n//  Copyright © 2016 Thomas P"
  },
  {
    "path": "Heart Control/Assets.xcassets/AppIcon.appiconset/Contents.json",
    "chars": 3312,
    "preview": "{\n  \"images\" : [\n    {\n      \"idiom\" : \"iphone\",\n      \"size\" : \"20x20\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"idiom\""
  },
  {
    "path": "Heart Control/Assets.xcassets/Contents.json",
    "chars": 62,
    "preview": "{\n  \"info\" : {\n    \"version\" : 1,\n    \"author\" : \"xcode\"\n  }\n}"
  },
  {
    "path": "Heart Control/Assets.xcassets/Heart Control.imageset/Contents.json",
    "chars": 310,
    "preview": "{\n  \"images\" : [\n    {\n      \"idiom\" : \"universal\",\n      \"scale\" : \"1x\"\n    },\n    {\n      \"idiom\" : \"universal\",\n     "
  },
  {
    "path": "Heart Control/Base.lproj/LaunchScreen.storyboard",
    "chars": 2956,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n<document type=\"com.apple.InterfaceBuilder3.CocoaTouch.Storyboard"
  },
  {
    "path": "Heart Control/Base.lproj/Main.storyboard",
    "chars": 4331,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n<document type=\"com.apple.InterfaceBuilder3.CocoaTouch.Storyboard"
  },
  {
    "path": "Heart Control/Heart Control.entitlements",
    "chars": 239,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/P"
  },
  {
    "path": "Heart Control/Info.plist",
    "chars": 1246,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/P"
  },
  {
    "path": "Heart Control/ViewController.swift",
    "chars": 519,
    "preview": "//\n//  ViewController.swift\n//  Heart Control\n//\n//  Created by Thomas Paul Mann on 01/08/16.\n//  Copyright © 2016 Thoma"
  },
  {
    "path": "Heart Control WatchKit App/Assets.xcassets/AppIcon.appiconset/Contents.json",
    "chars": 1546,
    "preview": "{\n  \"images\" : [\n    {\n      \"size\" : \"29x29\",\n      \"idiom\" : \"iphone\",\n      \"filename\" : \"Icon-29@2x.png\",\n      \"sca"
  },
  {
    "path": "Heart Control WatchKit App/Base.lproj/Interface.storyboard",
    "chars": 2676,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n<document type=\"com.apple.InterfaceBuilder.WatchKit.Storyboard\" v"
  },
  {
    "path": "Heart Control WatchKit App/Info.plist",
    "chars": 1100,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/P"
  },
  {
    "path": "Heart Control WatchKit Extension/Assets.xcassets/Complication.complicationset/Circular.imageset/Contents.json",
    "chars": 321,
    "preview": "{\n  \"images\" : [\n    {\n      \"idiom\" : \"watch\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"idiom\" : \"watch\",\n      \"scale\""
  },
  {
    "path": "Heart Control WatchKit Extension/Assets.xcassets/Complication.complicationset/Contents.json",
    "chars": 397,
    "preview": "{\n  \"assets\" : [\n    {\n      \"idiom\" : \"watch\",\n      \"filename\" : \"Circular.imageset\",\n      \"role\" : \"circular\"\n    },"
  },
  {
    "path": "Heart Control WatchKit Extension/Assets.xcassets/Complication.complicationset/Modular.imageset/Contents.json",
    "chars": 321,
    "preview": "{\n  \"images\" : [\n    {\n      \"idiom\" : \"watch\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"idiom\" : \"watch\",\n      \"scale\""
  },
  {
    "path": "Heart Control WatchKit Extension/Assets.xcassets/Complication.complicationset/Utilitarian.imageset/Contents.json",
    "chars": 321,
    "preview": "{\n  \"images\" : [\n    {\n      \"idiom\" : \"watch\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"idiom\" : \"watch\",\n      \"scale\""
  },
  {
    "path": "Heart Control WatchKit Extension/AuthorizationManger.swift",
    "chars": 1345,
    "preview": "//\n//  HKAuthorizationManger.swift\n//  Heart Control\n//\n//  Created by Thomas Paul Mann on 07/08/16.\n//  Copyright © 201"
  },
  {
    "path": "Heart Control WatchKit Extension/ExtensionDelegate.swift",
    "chars": 1472,
    "preview": "//\n//  ExtensionDelegate.swift\n//  Heart Control WatchKit Extension\n//\n//  Created by Thomas Paul Mann on 01/08/16.\n//  "
  },
  {
    "path": "Heart Control WatchKit Extension/HKUnit+BeatsPerMinute.swift",
    "chars": 324,
    "preview": "//\n//  HKUnit+BeatsPerMinute.swift\n//  Heart Control\n//\n//  Created by Thomas Paul Mann on 01/08/16.\n//  Copyright © 201"
  },
  {
    "path": "Heart Control WatchKit Extension/Heart Control WatchKit Extension.entitlements",
    "chars": 239,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/P"
  },
  {
    "path": "Heart Control WatchKit Extension/HeartRate.swift",
    "chars": 243,
    "preview": "//\n//  HeartRate.swift\n//  Heart Control\n//\n//  Created by Thomas Paul Mann on 07/08/16.\n//  Copyright © 2016 Thomas Pau"
  },
  {
    "path": "Heart Control WatchKit Extension/HeartRateManager.swift",
    "chars": 3326,
    "preview": "//\n//  HeartRateManager.swift\n//  Heart Control\n//\n//  Created by Thomas Paul Mann on 01/08/16.\n//  Copyright © 2016 Tho"
  },
  {
    "path": "Heart Control WatchKit Extension/Info.plist",
    "chars": 1366,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/P"
  },
  {
    "path": "Heart Control WatchKit Extension/InterfaceController.swift",
    "chars": 1482,
    "preview": "//\n//  InterfaceController.swift\n//  Heart Control WatchKit Extension\n//\n//  Created by Thomas Paul Mann on 01/08/16.\n//"
  },
  {
    "path": "Heart Control WatchKit Extension/WorkoutManager.swift",
    "chars": 3519,
    "preview": "//\n//  WorkoutManager.swift\n//  Heart Control\n//\n//  Created by Thomas Paul Mann on 01/08/16.\n//  Copyright © 2016 Thoma"
  },
  {
    "path": "Heart Control.xcodeproj/project.pbxproj",
    "chars": 29102,
    "preview": "// !$*UTF8*$!\n{\n\tarchiveVersion = 1;\n\tclasses = {\n\t};\n\tobjectVersion = 46;\n\tobjects = {\n\n/* Begin PBXBuildFile section *"
  },
  {
    "path": "Heart Control.xcodeproj/project.xcworkspace/contents.xcworkspacedata",
    "chars": 158,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Workspace\n   version = \"1.0\">\n   <FileRef\n      location = \"self:Heart Control.x"
  },
  {
    "path": "README.md",
    "chars": 934,
    "preview": "[![Swift](https://img.shields.io/badge/Swift-3.0-green.svg)](https://swift.org) [![watchOS](https://img.shields.io/badge"
  }
]

// ... and 1 more files (download for full content)

About this extraction

This page contains the full source code of the thomaspaulmann/HeartControl GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 30 files (62.8 KB), approximately 19.9k tokens. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!