diff --git a/TrackIT-2020Nonprofit-patch-3-4/README.md b/TrackIT-2020Nonprofit-patch-3-4/README.md new file mode 100644 index 0000000..2f4bde7 --- /dev/null +++ b/TrackIT-2020Nonprofit-patch-3-4/README.md @@ -0,0 +1,12 @@ +# TrackIT +Open source mobile app to help track proximity contacts using powerful bluetooth technology + +### How does it work + +App uses bluetooth functionalities of your phone to scan as many devices in certain area as possible. When app scans the device it stores it into memory. + +App is saving scanned devices with their special id identifier. Identifier can be put as compromised by only officials who are conducting tests then notification arrives for the user who have been in close proximity of the infected identifier , saying that he needs to give all necessary contact information to officials and to stay home. + +If user is signed trough system as "isolated" and comes in proximity of other devices officials will be notified of that health breach. + + diff --git a/TrackIT-2020Nonprofit-patch-3-4/TrackIT-2020Nonprofit-patch-2/README.md b/TrackIT-2020Nonprofit-patch-3-4/TrackIT-2020Nonprofit-patch-2/README.md new file mode 100644 index 0000000..2f4bde7 --- /dev/null +++ b/TrackIT-2020Nonprofit-patch-3-4/TrackIT-2020Nonprofit-patch-2/README.md @@ -0,0 +1,12 @@ +# TrackIT +Open source mobile app to help track proximity contacts using powerful bluetooth technology + +### How does it work + +App uses bluetooth functionalities of your phone to scan as many devices in certain area as possible. When app scans the device it stores it into memory. + +App is saving scanned devices with their special id identifier. Identifier can be put as compromised by only officials who are conducting tests then notification arrives for the user who have been in close proximity of the infected identifier , saying that he needs to give all necessary contact information to officials and to stay home. + +If user is signed trough system as "isolated" and comes in proximity of other devices officials will be notified of that health breach. + + diff --git a/TrackIT-2020Nonprofit-patch-3-4/TrackIT-2020Nonprofit-patch-2/swift_heart_rate_real_time-master/ElecDemo WatchKit App/Assets.xcassets/AppIcon.appiconset/Contents.json b/TrackIT-2020Nonprofit-patch-3-4/TrackIT-2020Nonprofit-patch-2/swift_heart_rate_real_time-master/ElecDemo WatchKit App/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..6c0f2b4 --- /dev/null +++ b/TrackIT-2020Nonprofit-patch-3-4/TrackIT-2020Nonprofit-patch-2/swift_heart_rate_real_time-master/ElecDemo WatchKit App/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,81 @@ +{ + "images" : [ + { + "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", + "role" : "companionSettings", + "scale" : "3x" + }, + { + "size" : "40x40", + "idiom" : "watch", + "scale" : "2x", + "role" : "appLauncher", + "subtype" : "38mm" + }, + { + "size" : "44x44", + "idiom" : "watch", + "scale" : "2x", + "role" : "appLauncher", + "subtype" : "40mm" + }, + { + "size" : "50x50", + "idiom" : "watch", + "scale" : "2x", + "role" : "appLauncher", + "subtype" : "44mm" + }, + { + "size" : "86x86", + "idiom" : "watch", + "scale" : "2x", + "role" : "quickLook", + "subtype" : "38mm" + }, + { + "size" : "98x98", + "idiom" : "watch", + "scale" : "2x", + "role" : "quickLook", + "subtype" : "42mm" + }, + { + "size" : "108x108", + "idiom" : "watch", + "scale" : "2x", + "role" : "quickLook", + "subtype" : "44mm" + }, + { + "idiom" : "watch-marketing", + "size" : "1024x1024", + "scale" : "1x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/TrackIT-2020Nonprofit-patch-3-4/TrackIT-2020Nonprofit-patch-2/swift_heart_rate_real_time-master/ElecDemo WatchKit App/Assets.xcassets/Contents.json b/TrackIT-2020Nonprofit-patch-3-4/TrackIT-2020Nonprofit-patch-2/swift_heart_rate_real_time-master/ElecDemo WatchKit App/Assets.xcassets/Contents.json new file mode 100644 index 0000000..da4a164 --- /dev/null +++ b/TrackIT-2020Nonprofit-patch-3-4/TrackIT-2020Nonprofit-patch-2/swift_heart_rate_real_time-master/ElecDemo WatchKit App/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/TrackIT-2020Nonprofit-patch-3-4/TrackIT-2020Nonprofit-patch-2/swift_heart_rate_real_time-master/ElecDemo WatchKit App/Base.lproj/Interface.storyboard b/TrackIT-2020Nonprofit-patch-3-4/TrackIT-2020Nonprofit-patch-2/swift_heart_rate_real_time-master/ElecDemo WatchKit App/Base.lproj/Interface.storyboard new file mode 100644 index 0000000..212743c --- /dev/null +++ b/TrackIT-2020Nonprofit-patch-3-4/TrackIT-2020Nonprofit-patch-2/swift_heart_rate_real_time-master/ElecDemo WatchKit App/Base.lproj/Interface.storyboard @@ -0,0 +1,71 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/TrackIT-2020Nonprofit-patch-3-4/TrackIT-2020Nonprofit-patch-2/swift_heart_rate_real_time-master/ElecDemo WatchKit App/Info.plist b/TrackIT-2020Nonprofit-patch-3-4/TrackIT-2020Nonprofit-patch-2/swift_heart_rate_real_time-master/ElecDemo WatchKit App/Info.plist new file mode 100644 index 0000000..a2fa9a2 --- /dev/null +++ b/TrackIT-2020Nonprofit-patch-3-4/TrackIT-2020Nonprofit-patch-2/swift_heart_rate_real_time-master/ElecDemo WatchKit App/Info.plist @@ -0,0 +1,33 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleDisplayName + ElecDemo WatchKit App + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + + WKCompanionAppBundleIdentifier + com.nhathm2.gst.pid.watchstandalone.ElecDemo + WKWatchKitApp + + + diff --git a/TrackIT-2020Nonprofit-patch-3-4/TrackIT-2020Nonprofit-patch-2/swift_heart_rate_real_time-master/ElecDemo WatchKit Extension/Assets.xcassets/Complication.complicationset/Circular.imageset/Contents.json b/TrackIT-2020Nonprofit-patch-3-4/TrackIT-2020Nonprofit-patch-2/swift_heart_rate_real_time-master/ElecDemo WatchKit Extension/Assets.xcassets/Complication.complicationset/Circular.imageset/Contents.json new file mode 100644 index 0000000..aefef29 --- /dev/null +++ b/TrackIT-2020Nonprofit-patch-3-4/TrackIT-2020Nonprofit-patch-2/swift_heart_rate_real_time-master/ElecDemo WatchKit Extension/Assets.xcassets/Complication.complicationset/Circular.imageset/Contents.json @@ -0,0 +1,28 @@ +{ + "images" : [ + { + "idiom" : "watch", + "scale" : "2x", + "screen-width" : "<=145" + }, + { + "idiom" : "watch", + "scale" : "2x", + "screen-width" : ">161" + }, + { + "idiom" : "watch", + "scale" : "2x", + "screen-width" : ">145" + }, + { + "idiom" : "watch", + "scale" : "2x", + "screen-width" : ">183" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/TrackIT-2020Nonprofit-patch-3-4/TrackIT-2020Nonprofit-patch-2/swift_heart_rate_real_time-master/ElecDemo WatchKit Extension/Assets.xcassets/Complication.complicationset/Contents.json b/TrackIT-2020Nonprofit-patch-3-4/TrackIT-2020Nonprofit-patch-2/swift_heart_rate_real_time-master/ElecDemo WatchKit Extension/Assets.xcassets/Complication.complicationset/Contents.json new file mode 100644 index 0000000..1571c7e --- /dev/null +++ b/TrackIT-2020Nonprofit-patch-3-4/TrackIT-2020Nonprofit-patch-2/swift_heart_rate_real_time-master/ElecDemo WatchKit Extension/Assets.xcassets/Complication.complicationset/Contents.json @@ -0,0 +1,48 @@ +{ + "assets" : [ + { + "idiom" : "watch", + "filename" : "Circular.imageset", + "role" : "circular" + }, + { + "idiom" : "watch", + "filename" : "Extra Large.imageset", + "role" : "extra-large" + }, + { + "idiom" : "watch", + "filename" : "Graphic Bezel.imageset", + "role" : "graphic-bezel" + }, + { + "idiom" : "watch", + "filename" : "Graphic Circular.imageset", + "role" : "graphic-circular" + }, + { + "idiom" : "watch", + "filename" : "Graphic Corner.imageset", + "role" : "graphic-corner" + }, + { + "idiom" : "watch", + "filename" : "Graphic Large Rectangular.imageset", + "role" : "graphic-large-rectangular" + }, + { + "idiom" : "watch", + "filename" : "Modular.imageset", + "role" : "modular" + }, + { + "idiom" : "watch", + "filename" : "Utilitarian.imageset", + "role" : "utilitarian" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/TrackIT-2020Nonprofit-patch-3-4/TrackIT-2020Nonprofit-patch-2/swift_heart_rate_real_time-master/ElecDemo WatchKit Extension/Assets.xcassets/Complication.complicationset/Extra Large.imageset/Contents.json b/TrackIT-2020Nonprofit-patch-3-4/TrackIT-2020Nonprofit-patch-2/swift_heart_rate_real_time-master/ElecDemo WatchKit Extension/Assets.xcassets/Complication.complicationset/Extra Large.imageset/Contents.json new file mode 100644 index 0000000..aefef29 --- /dev/null +++ b/TrackIT-2020Nonprofit-patch-3-4/TrackIT-2020Nonprofit-patch-2/swift_heart_rate_real_time-master/ElecDemo WatchKit Extension/Assets.xcassets/Complication.complicationset/Extra Large.imageset/Contents.json @@ -0,0 +1,28 @@ +{ + "images" : [ + { + "idiom" : "watch", + "scale" : "2x", + "screen-width" : "<=145" + }, + { + "idiom" : "watch", + "scale" : "2x", + "screen-width" : ">161" + }, + { + "idiom" : "watch", + "scale" : "2x", + "screen-width" : ">145" + }, + { + "idiom" : "watch", + "scale" : "2x", + "screen-width" : ">183" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/TrackIT-2020Nonprofit-patch-3-4/TrackIT-2020Nonprofit-patch-2/swift_heart_rate_real_time-master/ElecDemo WatchKit Extension/Assets.xcassets/Complication.complicationset/Graphic Bezel.imageset/Contents.json b/TrackIT-2020Nonprofit-patch-3-4/TrackIT-2020Nonprofit-patch-2/swift_heart_rate_real_time-master/ElecDemo WatchKit Extension/Assets.xcassets/Complication.complicationset/Graphic Bezel.imageset/Contents.json new file mode 100644 index 0000000..aefef29 --- /dev/null +++ b/TrackIT-2020Nonprofit-patch-3-4/TrackIT-2020Nonprofit-patch-2/swift_heart_rate_real_time-master/ElecDemo WatchKit Extension/Assets.xcassets/Complication.complicationset/Graphic Bezel.imageset/Contents.json @@ -0,0 +1,28 @@ +{ + "images" : [ + { + "idiom" : "watch", + "scale" : "2x", + "screen-width" : "<=145" + }, + { + "idiom" : "watch", + "scale" : "2x", + "screen-width" : ">161" + }, + { + "idiom" : "watch", + "scale" : "2x", + "screen-width" : ">145" + }, + { + "idiom" : "watch", + "scale" : "2x", + "screen-width" : ">183" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/TrackIT-2020Nonprofit-patch-3-4/TrackIT-2020Nonprofit-patch-2/swift_heart_rate_real_time-master/ElecDemo WatchKit Extension/Assets.xcassets/Complication.complicationset/Graphic Circular.imageset/Contents.json b/TrackIT-2020Nonprofit-patch-3-4/TrackIT-2020Nonprofit-patch-2/swift_heart_rate_real_time-master/ElecDemo WatchKit Extension/Assets.xcassets/Complication.complicationset/Graphic Circular.imageset/Contents.json new file mode 100644 index 0000000..aefef29 --- /dev/null +++ b/TrackIT-2020Nonprofit-patch-3-4/TrackIT-2020Nonprofit-patch-2/swift_heart_rate_real_time-master/ElecDemo WatchKit Extension/Assets.xcassets/Complication.complicationset/Graphic Circular.imageset/Contents.json @@ -0,0 +1,28 @@ +{ + "images" : [ + { + "idiom" : "watch", + "scale" : "2x", + "screen-width" : "<=145" + }, + { + "idiom" : "watch", + "scale" : "2x", + "screen-width" : ">161" + }, + { + "idiom" : "watch", + "scale" : "2x", + "screen-width" : ">145" + }, + { + "idiom" : "watch", + "scale" : "2x", + "screen-width" : ">183" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/TrackIT-2020Nonprofit-patch-3-4/TrackIT-2020Nonprofit-patch-2/swift_heart_rate_real_time-master/ElecDemo WatchKit Extension/Assets.xcassets/Complication.complicationset/Graphic Corner.imageset/Contents.json b/TrackIT-2020Nonprofit-patch-3-4/TrackIT-2020Nonprofit-patch-2/swift_heart_rate_real_time-master/ElecDemo WatchKit Extension/Assets.xcassets/Complication.complicationset/Graphic Corner.imageset/Contents.json new file mode 100644 index 0000000..aefef29 --- /dev/null +++ b/TrackIT-2020Nonprofit-patch-3-4/TrackIT-2020Nonprofit-patch-2/swift_heart_rate_real_time-master/ElecDemo WatchKit Extension/Assets.xcassets/Complication.complicationset/Graphic Corner.imageset/Contents.json @@ -0,0 +1,28 @@ +{ + "images" : [ + { + "idiom" : "watch", + "scale" : "2x", + "screen-width" : "<=145" + }, + { + "idiom" : "watch", + "scale" : "2x", + "screen-width" : ">161" + }, + { + "idiom" : "watch", + "scale" : "2x", + "screen-width" : ">145" + }, + { + "idiom" : "watch", + "scale" : "2x", + "screen-width" : ">183" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/TrackIT-2020Nonprofit-patch-3-4/TrackIT-2020Nonprofit-patch-2/swift_heart_rate_real_time-master/ElecDemo WatchKit Extension/Assets.xcassets/Complication.complicationset/Graphic Large Rectangular.imageset/Contents.json b/TrackIT-2020Nonprofit-patch-3-4/TrackIT-2020Nonprofit-patch-2/swift_heart_rate_real_time-master/ElecDemo WatchKit Extension/Assets.xcassets/Complication.complicationset/Graphic Large Rectangular.imageset/Contents.json new file mode 100644 index 0000000..aefef29 --- /dev/null +++ b/TrackIT-2020Nonprofit-patch-3-4/TrackIT-2020Nonprofit-patch-2/swift_heart_rate_real_time-master/ElecDemo WatchKit Extension/Assets.xcassets/Complication.complicationset/Graphic Large Rectangular.imageset/Contents.json @@ -0,0 +1,28 @@ +{ + "images" : [ + { + "idiom" : "watch", + "scale" : "2x", + "screen-width" : "<=145" + }, + { + "idiom" : "watch", + "scale" : "2x", + "screen-width" : ">161" + }, + { + "idiom" : "watch", + "scale" : "2x", + "screen-width" : ">145" + }, + { + "idiom" : "watch", + "scale" : "2x", + "screen-width" : ">183" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/TrackIT-2020Nonprofit-patch-3-4/TrackIT-2020Nonprofit-patch-2/swift_heart_rate_real_time-master/ElecDemo WatchKit Extension/Assets.xcassets/Complication.complicationset/Modular.imageset/Contents.json b/TrackIT-2020Nonprofit-patch-3-4/TrackIT-2020Nonprofit-patch-2/swift_heart_rate_real_time-master/ElecDemo WatchKit Extension/Assets.xcassets/Complication.complicationset/Modular.imageset/Contents.json new file mode 100644 index 0000000..aefef29 --- /dev/null +++ b/TrackIT-2020Nonprofit-patch-3-4/TrackIT-2020Nonprofit-patch-2/swift_heart_rate_real_time-master/ElecDemo WatchKit Extension/Assets.xcassets/Complication.complicationset/Modular.imageset/Contents.json @@ -0,0 +1,28 @@ +{ + "images" : [ + { + "idiom" : "watch", + "scale" : "2x", + "screen-width" : "<=145" + }, + { + "idiom" : "watch", + "scale" : "2x", + "screen-width" : ">161" + }, + { + "idiom" : "watch", + "scale" : "2x", + "screen-width" : ">145" + }, + { + "idiom" : "watch", + "scale" : "2x", + "screen-width" : ">183" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/TrackIT-2020Nonprofit-patch-3-4/TrackIT-2020Nonprofit-patch-2/swift_heart_rate_real_time-master/ElecDemo WatchKit Extension/Assets.xcassets/Complication.complicationset/Utilitarian.imageset/Contents.json b/TrackIT-2020Nonprofit-patch-3-4/TrackIT-2020Nonprofit-patch-2/swift_heart_rate_real_time-master/ElecDemo WatchKit Extension/Assets.xcassets/Complication.complicationset/Utilitarian.imageset/Contents.json new file mode 100644 index 0000000..aefef29 --- /dev/null +++ b/TrackIT-2020Nonprofit-patch-3-4/TrackIT-2020Nonprofit-patch-2/swift_heart_rate_real_time-master/ElecDemo WatchKit Extension/Assets.xcassets/Complication.complicationset/Utilitarian.imageset/Contents.json @@ -0,0 +1,28 @@ +{ + "images" : [ + { + "idiom" : "watch", + "scale" : "2x", + "screen-width" : "<=145" + }, + { + "idiom" : "watch", + "scale" : "2x", + "screen-width" : ">161" + }, + { + "idiom" : "watch", + "scale" : "2x", + "screen-width" : ">145" + }, + { + "idiom" : "watch", + "scale" : "2x", + "screen-width" : ">183" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/TrackIT-2020Nonprofit-patch-3-4/TrackIT-2020Nonprofit-patch-2/swift_heart_rate_real_time-master/ElecDemo WatchKit Extension/Assets.xcassets/Contents.json b/TrackIT-2020Nonprofit-patch-3-4/TrackIT-2020Nonprofit-patch-2/swift_heart_rate_real_time-master/ElecDemo WatchKit Extension/Assets.xcassets/Contents.json new file mode 100644 index 0000000..da4a164 --- /dev/null +++ b/TrackIT-2020Nonprofit-patch-3-4/TrackIT-2020Nonprofit-patch-2/swift_heart_rate_real_time-master/ElecDemo WatchKit Extension/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/TrackIT-2020Nonprofit-patch-3-4/TrackIT-2020Nonprofit-patch-2/swift_heart_rate_real_time-master/ElecDemo WatchKit Extension/ComplicationController.swift b/TrackIT-2020Nonprofit-patch-3-4/TrackIT-2020Nonprofit-patch-2/swift_heart_rate_real_time-master/ElecDemo WatchKit Extension/ComplicationController.swift new file mode 100644 index 0000000..b8a41f3 --- /dev/null +++ b/TrackIT-2020Nonprofit-patch-3-4/TrackIT-2020Nonprofit-patch-2/swift_heart_rate_real_time-master/ElecDemo WatchKit Extension/ComplicationController.swift @@ -0,0 +1,56 @@ +// +// ComplicationController.swift +// ElecDemo WatchKit Extension +// +// Created by NhatHM on 8/9/19. +// Copyright © 2019 GST.PID. All rights reserved. +// + +import ClockKit + + +class ComplicationController: NSObject, CLKComplicationDataSource { + + // MARK: - Timeline Configuration + + func getSupportedTimeTravelDirections(for complication: CLKComplication, withHandler handler: @escaping (CLKComplicationTimeTravelDirections) -> Void) { + handler([.forward, .backward]) + } + + func getTimelineStartDate(for complication: CLKComplication, withHandler handler: @escaping (Date?) -> Void) { + handler(nil) + } + + func getTimelineEndDate(for complication: CLKComplication, withHandler handler: @escaping (Date?) -> Void) { + handler(nil) + } + + func getPrivacyBehavior(for complication: CLKComplication, withHandler handler: @escaping (CLKComplicationPrivacyBehavior) -> Void) { + handler(.showOnLockScreen) + } + + // MARK: - Timeline Population + + func getCurrentTimelineEntry(for complication: CLKComplication, withHandler handler: @escaping (CLKComplicationTimelineEntry?) -> Void) { + // Call the handler with the current timeline entry + handler(nil) + } + + func getTimelineEntries(for complication: CLKComplication, before date: Date, limit: Int, withHandler handler: @escaping ([CLKComplicationTimelineEntry]?) -> Void) { + // Call the handler with the timeline entries prior to the given date + handler(nil) + } + + func getTimelineEntries(for complication: CLKComplication, after date: Date, limit: Int, withHandler handler: @escaping ([CLKComplicationTimelineEntry]?) -> Void) { + // Call the handler with the timeline entries after to the given date + handler(nil) + } + + // MARK: - Placeholder Templates + + func getLocalizableSampleTemplate(for complication: CLKComplication, withHandler handler: @escaping (CLKComplicationTemplate?) -> Void) { + // This method will be called once per supported complication, and the results will be cached + handler(nil) + } + +} diff --git a/TrackIT-2020Nonprofit-patch-3-4/TrackIT-2020Nonprofit-patch-2/swift_heart_rate_real_time-master/ElecDemo WatchKit Extension/ElecDemo WatchKit Extension.entitlements b/TrackIT-2020Nonprofit-patch-3-4/TrackIT-2020Nonprofit-patch-2/swift_heart_rate_real_time-master/ElecDemo WatchKit Extension/ElecDemo WatchKit Extension.entitlements new file mode 100644 index 0000000..2ab14a2 --- /dev/null +++ b/TrackIT-2020Nonprofit-patch-3-4/TrackIT-2020Nonprofit-patch-2/swift_heart_rate_real_time-master/ElecDemo WatchKit Extension/ElecDemo WatchKit Extension.entitlements @@ -0,0 +1,10 @@ + + + + + com.apple.developer.healthkit + + com.apple.developer.healthkit.access + + + diff --git a/TrackIT-2020Nonprofit-patch-3-4/TrackIT-2020Nonprofit-patch-2/swift_heart_rate_real_time-master/ElecDemo WatchKit Extension/ExtensionDelegate.swift b/TrackIT-2020Nonprofit-patch-3-4/TrackIT-2020Nonprofit-patch-2/swift_heart_rate_real_time-master/ElecDemo WatchKit Extension/ExtensionDelegate.swift new file mode 100644 index 0000000..904ddc8 --- /dev/null +++ b/TrackIT-2020Nonprofit-patch-3-4/TrackIT-2020Nonprofit-patch-2/swift_heart_rate_real_time-master/ElecDemo WatchKit Extension/ExtensionDelegate.swift @@ -0,0 +1,56 @@ +// +// ExtensionDelegate.swift +// ElecDemo WatchKit Extension +// +// Created by NhatHM on 8/9/19. +// Copyright © 2019 GST.PID. 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) { + // 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. + for task in backgroundTasks { + // Use a switch statement to check the task type + switch task { + case let backgroundTask as WKApplicationRefreshBackgroundTask: + // Be sure to complete the background task once you’re done. + backgroundTask.setTaskCompletedWithSnapshot(false) + case let snapshotTask as WKSnapshotRefreshBackgroundTask: + // Snapshot tasks have a unique completion call, make sure to set your expiration date + snapshotTask.setTaskCompleted(restoredDefaultState: true, estimatedSnapshotExpiration: Date.distantFuture, userInfo: nil) + case let connectivityTask as WKWatchConnectivityRefreshBackgroundTask: + // Be sure to complete the connectivity task once you’re done. + connectivityTask.setTaskCompletedWithSnapshot(false) + case let urlSessionTask as WKURLSessionRefreshBackgroundTask: + // Be sure to complete the URL session task once you’re done. + urlSessionTask.setTaskCompletedWithSnapshot(false) + case let relevantShortcutTask as WKRelevantShortcutRefreshBackgroundTask: + // Be sure to complete the relevant-shortcut task once you're done. + relevantShortcutTask.setTaskCompletedWithSnapshot(false) + case let intentDidRunTask as WKIntentDidRunRefreshBackgroundTask: + // Be sure to complete the intent-did-run task once you're done. + intentDidRunTask.setTaskCompletedWithSnapshot(false) + default: + // make sure to complete unhandled task types + task.setTaskCompletedWithSnapshot(false) + } + } + } + +} diff --git a/TrackIT-2020Nonprofit-patch-3-4/TrackIT-2020Nonprofit-patch-2/swift_heart_rate_real_time-master/ElecDemo WatchKit Extension/Info.plist b/TrackIT-2020Nonprofit-patch-3-4/TrackIT-2020Nonprofit-patch-2/swift_heart_rate_real_time-master/ElecDemo WatchKit Extension/Info.plist new file mode 100644 index 0000000..edc2491 --- /dev/null +++ b/TrackIT-2020Nonprofit-patch-3-4/TrackIT-2020Nonprofit-patch-2/swift_heart_rate_real_time-master/ElecDemo WatchKit Extension/Info.plist @@ -0,0 +1,66 @@ + + + + + NSHealthUpdateUsageDescription + Using healthkit data for workout session + NSHealthShareUsageDescription + Using healthkit data for workout session + NSHealthClinicalHealthRecordsShareUsageDescription + Using healthkit data for workout session + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleDisplayName + ElecDemo WatchKit Extension + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + XPC! + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + CLKComplicationPrincipalClass + $(PRODUCT_MODULE_NAME).ComplicationController + CLKComplicationSupportedFamilies + + CLKComplicationFamilyModularSmall + CLKComplicationFamilyModularLarge + CLKComplicationFamilyUtilitarianSmall + CLKComplicationFamilyUtilitarianSmallFlat + CLKComplicationFamilyUtilitarianLarge + CLKComplicationFamilyCircularSmall + CLKComplicationFamilyExtraLarge + CLKComplicationFamilyGraphicCorner + CLKComplicationFamilyGraphicBezel + CLKComplicationFamilyGraphicCircular + CLKComplicationFamilyGraphicRectangular + + NSExtension + + NSExtensionAttributes + + WKAppBundleIdentifier + com.nhathm2.gst.pid.watchstandalone.ElecDemo.watchkitapp + + NSExtensionPointIdentifier + com.apple.watchkit + + UIBackgroundModes + + location + + WKBackgroundModes + + workout-processing + + WKExtensionDelegateClassName + $(PRODUCT_MODULE_NAME).ExtensionDelegate + + diff --git a/TrackIT-2020Nonprofit-patch-3-4/TrackIT-2020Nonprofit-patch-2/swift_heart_rate_real_time-master/ElecDemo WatchKit Extension/MainController.swift b/TrackIT-2020Nonprofit-patch-3-4/TrackIT-2020Nonprofit-patch-2/swift_heart_rate_real_time-master/ElecDemo WatchKit Extension/MainController.swift new file mode 100644 index 0000000..a2cba77 --- /dev/null +++ b/TrackIT-2020Nonprofit-patch-3-4/TrackIT-2020Nonprofit-patch-2/swift_heart_rate_real_time-master/ElecDemo WatchKit Extension/MainController.swift @@ -0,0 +1,70 @@ +// +// MainController.swift +// ElecDemo WatchKit Extension +// +// Created by NhatHM on 8/12/19. +// Copyright © 2019 GST.PID. All rights reserved. +// + +import WatchKit +import HealthKit + +class MainController: WKInterfaceController { + @IBOutlet weak var userNameLabel: WKInterfaceLabel! + @IBOutlet weak var stepCountsLabel: WKInterfaceLabel! + @IBOutlet weak var heartRateLabel: WKInterfaceLabel! + + override func awake(withContext context: Any?) { + super.awake(withContext: context) + + // Configure interface objects here. + print("AWAKE") + WorkoutTracking.authorizeHealthKit() + WorkoutTracking.shared.startWorkOut() + WorkoutTracking.shared.delegate = self + + WatchKitConnection.shared.delegate = self + WatchKitConnection.shared.startSession() + } + + override func willActivate() { + // This method is called when watch view controller is about to be visible to user + super.willActivate() + print("WILL ACTIVE") + WorkoutTracking.shared.fetchStepCounts() + } + + override func didDeactivate() { + // This method is called when watch view controller is no longer visible + super.didDeactivate() + print("DID DEACTIVE") + } +} + +extension MainController { + @IBAction func startWorkout() { + WorkoutTracking.shared.startWorkOut() + } + + @IBAction func stopWorkout() { + WorkoutTracking.shared.stopWorkOut() + } +} + +extension MainController: WorkoutTrackingDelegate { + func didReceiveHealthKitHeartRate(_ heartRate: Double) { + heartRateLabel.setText("\(heartRate) BPM") + WatchKitConnection.shared.sendMessage(message: ["heartRate": + "\(heartRate)" as AnyObject]) + } + + func didReceiveHealthKitStepCounts(_ stepCounts: Double) { + stepCountsLabel.setText("\(stepCounts) STEPS") + } +} + +extension MainController: WatchKitConnectionDelegate { + func didReceiveUserName(_ userName: String) { + userNameLabel.setText(userName) + } +} diff --git a/TrackIT-2020Nonprofit-patch-3-4/TrackIT-2020Nonprofit-patch-2/swift_heart_rate_real_time-master/ElecDemo WatchKit Extension/NotificationController.swift b/TrackIT-2020Nonprofit-patch-3-4/TrackIT-2020Nonprofit-patch-2/swift_heart_rate_real_time-master/ElecDemo WatchKit Extension/NotificationController.swift new file mode 100644 index 0000000..02313e6 --- /dev/null +++ b/TrackIT-2020Nonprofit-patch-3-4/TrackIT-2020Nonprofit-patch-2/swift_heart_rate_real_time-master/ElecDemo WatchKit Extension/NotificationController.swift @@ -0,0 +1,38 @@ +// +// NotificationController.swift +// ElecDemo WatchKit Extension +// +// Created by NhatHM on 8/9/19. +// Copyright © 2019 GST.PID. All rights reserved. +// + +import WatchKit +import Foundation +import UserNotifications + + +class NotificationController: WKUserNotificationInterfaceController { + + override init() { + // Initialize variables here. + super.init() + + // Configure interface objects here. + } + + override func willActivate() { + // This method is called when watch view controller is about to be visible to user + super.willActivate() + } + + override func didDeactivate() { + // This method is called when watch view controller is no longer visible + super.didDeactivate() + } + + override func didReceive(_ notification: UNNotification) { + // This method is called when a notification needs to be presented. + // Implement it if you use a dynamic notification interface. + // Populate your dynamic notification interface as quickly as possible. + } +} diff --git a/TrackIT-2020Nonprofit-patch-3-4/TrackIT-2020Nonprofit-patch-2/swift_heart_rate_real_time-master/ElecDemo WatchKit Extension/PushNotificationPayload.apns b/TrackIT-2020Nonprofit-patch-3-4/TrackIT-2020Nonprofit-patch-2/swift_heart_rate_real_time-master/ElecDemo WatchKit Extension/PushNotificationPayload.apns new file mode 100644 index 0000000..5ac5526 --- /dev/null +++ b/TrackIT-2020Nonprofit-patch-3-4/TrackIT-2020Nonprofit-patch-2/swift_heart_rate_real_time-master/ElecDemo WatchKit Extension/PushNotificationPayload.apns @@ -0,0 +1,20 @@ +{ + "aps": { + "alert": { + "body": "Test message", + "title": "Optional title", + "subtitle": "Optional subtitle" + }, + "category": "myCategory", + "thread-id":"5280" + }, + + "WatchKit Simulator Actions": [ + { + "title": "First Button", + "identifier": "firstButtonAction" + } + ], + + "customKey": "Use this file to define a testing payload for your notifications. The aps dictionary specifies the category, alert text and title. The WatchKit Simulator Actions array can provide info for one or more action buttons in addition to the standard Dismiss button. Any other top level keys are custom payload. If you have multiple such JSON files in your project, you'll be able to select them when choosing to debug the notification interface of your Watch App." +} diff --git a/TrackIT-2020Nonprofit-patch-3-4/TrackIT-2020Nonprofit-patch-2/swift_heart_rate_real_time-master/ElecDemo WatchKit Extension/WatchKitConnection.swift b/TrackIT-2020Nonprofit-patch-3-4/TrackIT-2020Nonprofit-patch-2/swift_heart_rate_real_time-master/ElecDemo WatchKit Extension/WatchKitConnection.swift new file mode 100644 index 0000000..e8270fe --- /dev/null +++ b/TrackIT-2020Nonprofit-patch-3-4/TrackIT-2020Nonprofit-patch-2/swift_heart_rate_real_time-master/ElecDemo WatchKit Extension/WatchKitConnection.swift @@ -0,0 +1,80 @@ +// +// WatchKitConnection.swift +// ElecDemo +// +// Created by NhatHM on 8/12/19. +// Copyright © 2019 GST.PID. All rights reserved. +// + +import Foundation +import WatchConnectivity + +protocol WatchKitConnectionDelegate: class { + func didReceiveUserName(_ userName: String) +} + +protocol WatchKitConnectionProtocol { + func startSession() + func sendMessage(message: [String : AnyObject], replyHandler: (([String : AnyObject]) -> Void)?, errorHandler: ((NSError) -> Void)?) + +} + +class WatchKitConnection: NSObject { + static let shared = WatchKitConnection() + weak var delegate: WatchKitConnectionDelegate? + + private override init() { + super.init() + } + + private let session: WCSession? = WCSession.isSupported() ? WCSession.default : nil + + private var validSession: WCSession? { +#if os(iOS) + if let session = session, session.isPaired, session.isWatchAppInstalled { + return session + } +#elseif os(watchOS) + return session +#endif + } + + private var validReachableSession: WCSession? { + if let session = validSession, session.isReachable { + return session + } + return nil + } +} + +extension WatchKitConnection: WatchKitConnectionProtocol { + func startSession() { + session?.delegate = self + session?.activate() + } + + func sendMessage(message: [String : AnyObject], + replyHandler: (([String : AnyObject]) -> Void)? = nil, + errorHandler: ((NSError) -> Void)? = nil) + { + validReachableSession?.sendMessage(message, replyHandler: { (result) in + print(result) + }, errorHandler: { (error) in + print(error) + }) + } +} + +extension WatchKitConnection: WCSessionDelegate { + func session(_ session: WCSession, activationDidCompleteWith activationState: WCSessionActivationState, error: Error?) { + print("activationDidCompleteWith") + } + + func session(_ session: WCSession, didReceiveMessage message: [String : Any], replyHandler: @escaping ([String : Any]) -> Void) { + guard let userName = message.values.first as? String else { + return + } + + delegate?.didReceiveUserName(userName) + } +} diff --git a/TrackIT-2020Nonprofit-patch-3-4/TrackIT-2020Nonprofit-patch-2/swift_heart_rate_real_time-master/ElecDemo WatchKit Extension/WatchWorkoutTracking.swift b/TrackIT-2020Nonprofit-patch-3-4/TrackIT-2020Nonprofit-patch-2/swift_heart_rate_real_time-master/ElecDemo WatchKit Extension/WatchWorkoutTracking.swift new file mode 100644 index 0000000..53e3736 --- /dev/null +++ b/TrackIT-2020Nonprofit-patch-3-4/TrackIT-2020Nonprofit-patch-2/swift_heart_rate_real_time-master/ElecDemo WatchKit Extension/WatchWorkoutTracking.swift @@ -0,0 +1,198 @@ +// +// WatchWorkoutTracking.swift +// ElecDemo WatchKit Extension +// +// Created by NhatHM on 8/12/19. +// Copyright © 2019 GST.PID. All rights reserved. +// + +import Foundation +import HealthKit + +protocol WorkoutTrackingDelegate: class { + func didReceiveHealthKitHeartRate(_ heartRate: Double) + func didReceiveHealthKitStepCounts(_ stepCounts: Double) +} + +protocol WorkoutTrackingProtocol { + static func authorizeHealthKit() + func startWorkOut() + func stopWorkOut() + func fetchStepCounts() +} + +class WorkoutTracking: NSObject { + static let shared = WorkoutTracking() + let healthStore = HKHealthStore() + let configuration = HKWorkoutConfiguration() + var workoutSession: HKWorkoutSession! + var workoutBuilder: HKLiveWorkoutBuilder! + + weak var delegate: WorkoutTrackingDelegate? + + override init() { + super.init() + } +} + +extension WorkoutTracking { + private func handleSendStatisticsData(_ statistics: HKStatistics) { + switch statistics.quantityType { + case HKQuantityType.quantityType(forIdentifier: .heartRate): + let heartRateUnit = HKUnit.count().unitDivided(by: HKUnit.minute()) + let value = statistics.mostRecentQuantity()?.doubleValue(for: heartRateUnit) + let roundedValue = Double( round( 1 * value! ) / 1 ) + delegate?.didReceiveHealthKitHeartRate(roundedValue) + + case HKQuantityType.quantityType(forIdentifier: .stepCount): + guard let stepCounts = HKQuantityType.quantityType(forIdentifier: .stepCount) else { + return + } + let startOfDay = Calendar.current.startOfDay(for: Date()) + let predicate = HKQuery.predicateForSamples(withStart: startOfDay, end: Date(), options: .strictStartDate) + + let query = HKStatisticsQuery(quantityType: stepCounts, quantitySamplePredicate: predicate, options: .cumulativeSum) { [weak self] (_, result, error) in + guard let weakSelf = self else { + return + } + var resultCount = 0.0 + guard let result = result else { + print("Failed to fetch steps rate") + return + } + + if let sum = result.sumQuantity() { + resultCount = sum.doubleValue(for: HKUnit.count()) + weakSelf.delegate?.didReceiveHealthKitStepCounts(resultCount) + } else { + print("Failed to fetch steps rate 2") + } + } + healthStore.execute(query) + return + default: + return + } + } + + private func configWorkout() { + configuration.activityType = .walking + + do { + workoutSession = try HKWorkoutSession(healthStore: healthStore, configuration: configuration) + workoutBuilder = workoutSession?.associatedWorkoutBuilder() + } catch { + return + } + + workoutSession.delegate = self + workoutBuilder.delegate = self + + workoutBuilder.dataSource = HKLiveWorkoutDataSource(healthStore: healthStore, workoutConfiguration: configuration) + } +} + +extension WorkoutTracking: WorkoutTrackingProtocol { + static func authorizeHealthKit() { + if HKHealthStore.isHealthDataAvailable() { + let infoToRead = Set([ + HKSampleType.quantityType(forIdentifier: .stepCount)!, + HKSampleType.quantityType(forIdentifier: .heartRate)!, + HKSampleType.workoutType() + ]) + + let infoToShare = Set([ + HKSampleType.quantityType(forIdentifier: .stepCount)!, + HKSampleType.quantityType(forIdentifier: .heartRate)!, + HKSampleType.workoutType() + ]) + + HKHealthStore().requestAuthorization(toShare: infoToShare, read: infoToRead) { (success, error) in + if success { + print("Authorization healthkit success") + } else if let error = error { + print(error) + } + } + } else { + print("HealthKit not avaiable") + } + } + + func startWorkOut() { + print("Start workout") + configWorkout() + workoutSession.startActivity(with: Date()) + workoutBuilder.beginCollection(withStart: Date()) { (success, error) in + print(success) + if let error = error { + print(error) + } + } + } + + func stopWorkOut() { + print("Stop workout") + workoutSession.stopActivity(with: Date()) + workoutSession.end() + workoutBuilder.endCollection(withEnd: Date()) { (success, error) in + + } + } + + func fetchStepCounts() { + guard let stepCounts = HKQuantityType.quantityType(forIdentifier: .stepCount) else { + return + } + let startOfDay = Calendar.current.startOfDay(for: Date()) + let predicate = HKQuery.predicateForSamples(withStart: startOfDay, end: Date(), options: .strictStartDate) + + let query = HKStatisticsQuery(quantityType: stepCounts, quantitySamplePredicate: predicate, options: .cumulativeSum) { [weak self] (_, result, error) in + guard let weakSelf = self else { + return + } + var resultCount = 0.0 + guard let result = result else { + print("Failed to fetch steps rate") + return + } + + if let sum = result.sumQuantity() { + resultCount = sum.doubleValue(for: HKUnit.count()) + weakSelf.delegate?.didReceiveHealthKitStepCounts(resultCount) + } else { + print("Failed to fetch steps rate 2") + } + } + healthStore.execute(query) + } +} + +extension WorkoutTracking: HKLiveWorkoutBuilderDelegate { + func workoutBuilder(_ workoutBuilder: HKLiveWorkoutBuilder, didCollectDataOf collectedTypes: Set) { + print("GET DATA: \(Date())") + for type in collectedTypes { + guard let quantityType = type as? HKQuantityType else { + return + } + + if let statistics = workoutBuilder.statistics(for: quantityType) { + handleSendStatisticsData(statistics) + } + } + } + + func workoutBuilderDidCollectEvent(_ workoutBuilder: HKLiveWorkoutBuilder) { + + } +} + +extension WorkoutTracking: HKWorkoutSessionDelegate { + func workoutSession(_ workoutSession: HKWorkoutSession, didChangeTo toState: HKWorkoutSessionState, from fromState: HKWorkoutSessionState, date: Date) { + + } + + func workoutSession(_ workoutSession: HKWorkoutSession, didFailWithError error: Error) { + + } +} diff --git a/TrackIT-2020Nonprofit-patch-3-4/TrackIT-2020Nonprofit-patch-2/swift_heart_rate_real_time-master/ElecDemo.xcodeproj/project.pbxproj b/TrackIT-2020Nonprofit-patch-3-4/TrackIT-2020Nonprofit-patch-2/swift_heart_rate_real_time-master/ElecDemo.xcodeproj/project.pbxproj new file mode 100644 index 0000000..0697802 --- /dev/null +++ b/TrackIT-2020Nonprofit-patch-3-4/TrackIT-2020Nonprofit-patch-2/swift_heart_rate_real_time-master/ElecDemo.xcodeproj/project.pbxproj @@ -0,0 +1,944 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 50; + objects = { + +/* Begin PBXBuildFile section */ + 0C278F3322FD3E8200818F9A /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0C278F3222FD3E8200818F9A /* AppDelegate.swift */; }; + 0C278F3522FD3E8200818F9A /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0C278F3422FD3E8200818F9A /* ViewController.swift */; }; + 0C278F3822FD3E8200818F9A /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 0C278F3622FD3E8200818F9A /* Main.storyboard */; }; + 0C278F3A22FD3E8400818F9A /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 0C278F3922FD3E8400818F9A /* Assets.xcassets */; }; + 0C278F3D22FD3E8400818F9A /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 0C278F3B22FD3E8400818F9A /* LaunchScreen.storyboard */; }; + 0C278F4822FD3E8400818F9A /* ElecDemoTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0C278F4722FD3E8400818F9A /* ElecDemoTests.swift */; }; + 0C278F5322FD3E8400818F9A /* ElecDemoUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0C278F5222FD3E8400818F9A /* ElecDemoUITests.swift */; }; + 0C278F5822FD3E8400818F9A /* ElecDemo WatchKit App.app in Embed Watch Content */ = {isa = PBXBuildFile; fileRef = 0C278F5722FD3E8400818F9A /* ElecDemo WatchKit App.app */; }; + 0C278F5E22FD3E8400818F9A /* Interface.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 0C278F5C22FD3E8400818F9A /* Interface.storyboard */; }; + 0C278F6022FD3E8500818F9A /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 0C278F5F22FD3E8500818F9A /* Assets.xcassets */; }; + 0C278F6722FD3E8500818F9A /* ElecDemo WatchKit Extension.appex in Embed App Extensions */ = {isa = PBXBuildFile; fileRef = 0C278F6622FD3E8500818F9A /* ElecDemo WatchKit Extension.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; + 0C278F6E22FD3E8500818F9A /* ExtensionDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0C278F6D22FD3E8500818F9A /* ExtensionDelegate.swift */; }; + 0C278F7022FD3E8500818F9A /* NotificationController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0C278F6F22FD3E8500818F9A /* NotificationController.swift */; }; + 0C278F7222FD3E8500818F9A /* ComplicationController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0C278F7122FD3E8500818F9A /* ComplicationController.swift */; }; + 0C278F7422FD3E8500818F9A /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 0C278F7322FD3E8500818F9A /* Assets.xcassets */; }; + 0C66C21F23010FEE0032505C /* MainController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0C66C21E23010FEE0032505C /* MainController.swift */; }; + 0C66C222230117BB0032505C /* HealthKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0C66C221230117BB0032505C /* HealthKit.framework */; }; + 0C66C225230119820032505C /* WorkoutTracking.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0C66C224230119820032505C /* WorkoutTracking.swift */; }; + 0C66C227230121660032505C /* HealthKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0C66C226230121660032505C /* HealthKit.framework */; }; + 0C66C22A230121E80032505C /* LocalNotificationHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0C66C229230121E80032505C /* LocalNotificationHelper.swift */; }; + 0C66C22C230125EE0032505C /* WatchKitConnection.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0C66C22B230125EE0032505C /* WatchKitConnection.swift */; }; + 0C66C22E23012B8B0032505C /* WatchWorkoutTracking.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0C66C22D23012B8B0032505C /* WatchWorkoutTracking.swift */; }; + 0CA35A5A2302337D00B25189 /* WatchKitConnection.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0CA35A592302337D00B25189 /* WatchKitConnection.swift */; }; + 0CA35A5C230272A500B25189 /* APIFetcher.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0CA35A5B230272A500B25189 /* APIFetcher.swift */; }; + E1593638242AEE180050E914 /* ColorService.swift in Sources */ = {isa = PBXBuildFile; fileRef = E1593637242AEE180050E914 /* ColorService.swift */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 0C278F4422FD3E8400818F9A /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 0C278F2722FD3E8200818F9A /* Project object */; + proxyType = 1; + remoteGlobalIDString = 0C278F2E22FD3E8200818F9A; + remoteInfo = ElecDemo; + }; + 0C278F4F22FD3E8400818F9A /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 0C278F2722FD3E8200818F9A /* Project object */; + proxyType = 1; + remoteGlobalIDString = 0C278F2E22FD3E8200818F9A; + remoteInfo = ElecDemo; + }; + 0C278F5922FD3E8400818F9A /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 0C278F2722FD3E8200818F9A /* Project object */; + proxyType = 1; + remoteGlobalIDString = 0C278F5622FD3E8400818F9A; + remoteInfo = "ElecDemo WatchKit App"; + }; + 0C278F6822FD3E8500818F9A /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 0C278F2722FD3E8200818F9A /* Project object */; + proxyType = 1; + remoteGlobalIDString = 0C278F6522FD3E8500818F9A; + remoteInfo = "ElecDemo WatchKit Extension"; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 0C278F7C22FD3E8500818F9A /* Embed App Extensions */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 13; + files = ( + 0C278F6722FD3E8500818F9A /* ElecDemo WatchKit Extension.appex in Embed App Extensions */, + ); + name = "Embed App Extensions"; + runOnlyForDeploymentPostprocessing = 0; + }; + 0C278F8022FD3E8500818F9A /* Embed Watch Content */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = "$(CONTENTS_FOLDER_PATH)/Watch"; + dstSubfolderSpec = 16; + files = ( + 0C278F5822FD3E8400818F9A /* ElecDemo WatchKit App.app in Embed Watch Content */, + ); + name = "Embed Watch Content"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 0C278F2F22FD3E8200818F9A /* ElecDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ElecDemo.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 0C278F3222FD3E8200818F9A /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 0C278F3422FD3E8200818F9A /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; + 0C278F3722FD3E8200818F9A /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 0C278F3922FD3E8400818F9A /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 0C278F3C22FD3E8400818F9A /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + 0C278F3E22FD3E8400818F9A /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 0C278F4322FD3E8400818F9A /* ElecDemoTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = ElecDemoTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 0C278F4722FD3E8400818F9A /* ElecDemoTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ElecDemoTests.swift; sourceTree = ""; }; + 0C278F4922FD3E8400818F9A /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 0C278F4E22FD3E8400818F9A /* ElecDemoUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = ElecDemoUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 0C278F5222FD3E8400818F9A /* ElecDemoUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ElecDemoUITests.swift; sourceTree = ""; }; + 0C278F5422FD3E8400818F9A /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 0C278F5722FD3E8400818F9A /* ElecDemo WatchKit App.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "ElecDemo WatchKit App.app"; sourceTree = BUILT_PRODUCTS_DIR; }; + 0C278F5D22FD3E8400818F9A /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Interface.storyboard; sourceTree = ""; }; + 0C278F5F22FD3E8500818F9A /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 0C278F6122FD3E8500818F9A /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 0C278F6622FD3E8500818F9A /* ElecDemo WatchKit Extension.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = "ElecDemo WatchKit Extension.appex"; sourceTree = BUILT_PRODUCTS_DIR; }; + 0C278F6D22FD3E8500818F9A /* ExtensionDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ExtensionDelegate.swift; sourceTree = ""; }; + 0C278F6F22FD3E8500818F9A /* NotificationController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NotificationController.swift; sourceTree = ""; }; + 0C278F7122FD3E8500818F9A /* ComplicationController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ComplicationController.swift; sourceTree = ""; }; + 0C278F7322FD3E8500818F9A /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 0C278F7522FD3E8500818F9A /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 0C278F7622FD3E8500818F9A /* PushNotificationPayload.apns */ = {isa = PBXFileReference; lastKnownFileType = text; path = PushNotificationPayload.apns; sourceTree = ""; }; + 0C66C21E23010FEE0032505C /* MainController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainController.swift; sourceTree = ""; }; + 0C66C221230117BB0032505C /* HealthKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = HealthKit.framework; path = Platforms/WatchOS.platform/Developer/SDKs/WatchOS5.3.sdk/System/Library/Frameworks/HealthKit.framework; sourceTree = DEVELOPER_DIR; }; + 0C66C223230117BB0032505C /* ElecDemo WatchKit Extension.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = "ElecDemo WatchKit Extension.entitlements"; sourceTree = ""; }; + 0C66C224230119820032505C /* WorkoutTracking.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WorkoutTracking.swift; sourceTree = ""; }; + 0C66C226230121660032505C /* HealthKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = HealthKit.framework; path = System/Library/Frameworks/HealthKit.framework; sourceTree = SDKROOT; }; + 0C66C228230121660032505C /* ElecDemo.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = ElecDemo.entitlements; sourceTree = ""; }; + 0C66C229230121E80032505C /* LocalNotificationHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LocalNotificationHelper.swift; sourceTree = ""; }; + 0C66C22B230125EE0032505C /* WatchKitConnection.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WatchKitConnection.swift; sourceTree = ""; }; + 0C66C22D23012B8B0032505C /* WatchWorkoutTracking.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WatchWorkoutTracking.swift; sourceTree = ""; }; + 0CA35A592302337D00B25189 /* WatchKitConnection.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WatchKitConnection.swift; sourceTree = ""; }; + 0CA35A5B230272A500B25189 /* APIFetcher.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = APIFetcher.swift; sourceTree = ""; }; + E1593637242AEE180050E914 /* ColorService.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ColorService.swift; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 0C278F2C22FD3E8200818F9A /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 0C66C227230121660032505C /* HealthKit.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 0C278F4022FD3E8400818F9A /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 0C278F4B22FD3E8400818F9A /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 0C278F6322FD3E8500818F9A /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 0C66C222230117BB0032505C /* HealthKit.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 0C278F2622FD3E8200818F9A = { + isa = PBXGroup; + children = ( + 0C278F3122FD3E8200818F9A /* ElecDemo */, + 0C278F4622FD3E8400818F9A /* ElecDemoTests */, + 0C278F5122FD3E8400818F9A /* ElecDemoUITests */, + 0C278F5B22FD3E8400818F9A /* ElecDemo WatchKit App */, + 0C278F6A22FD3E8500818F9A /* ElecDemo WatchKit Extension */, + 0C278F3022FD3E8200818F9A /* Products */, + 0C66C220230117BB0032505C /* Frameworks */, + ); + sourceTree = ""; + }; + 0C278F3022FD3E8200818F9A /* Products */ = { + isa = PBXGroup; + children = ( + 0C278F2F22FD3E8200818F9A /* ElecDemo.app */, + 0C278F4322FD3E8400818F9A /* ElecDemoTests.xctest */, + 0C278F4E22FD3E8400818F9A /* ElecDemoUITests.xctest */, + 0C278F5722FD3E8400818F9A /* ElecDemo WatchKit App.app */, + 0C278F6622FD3E8500818F9A /* ElecDemo WatchKit Extension.appex */, + ); + name = Products; + sourceTree = ""; + }; + 0C278F3122FD3E8200818F9A /* ElecDemo */ = { + isa = PBXGroup; + children = ( + 0C66C228230121660032505C /* ElecDemo.entitlements */, + 0C278F3222FD3E8200818F9A /* AppDelegate.swift */, + 0C278F3422FD3E8200818F9A /* ViewController.swift */, + 0C66C224230119820032505C /* WorkoutTracking.swift */, + E1593637242AEE180050E914 /* ColorService.swift */, + 0C66C229230121E80032505C /* LocalNotificationHelper.swift */, + 0C66C22B230125EE0032505C /* WatchKitConnection.swift */, + 0CA35A5B230272A500B25189 /* APIFetcher.swift */, + 0C278F3622FD3E8200818F9A /* Main.storyboard */, + 0C278F3922FD3E8400818F9A /* Assets.xcassets */, + 0C278F3B22FD3E8400818F9A /* LaunchScreen.storyboard */, + 0C278F3E22FD3E8400818F9A /* Info.plist */, + ); + path = ElecDemo; + sourceTree = ""; + }; + 0C278F4622FD3E8400818F9A /* ElecDemoTests */ = { + isa = PBXGroup; + children = ( + 0C278F4722FD3E8400818F9A /* ElecDemoTests.swift */, + 0C278F4922FD3E8400818F9A /* Info.plist */, + ); + path = ElecDemoTests; + sourceTree = ""; + }; + 0C278F5122FD3E8400818F9A /* ElecDemoUITests */ = { + isa = PBXGroup; + children = ( + 0C278F5222FD3E8400818F9A /* ElecDemoUITests.swift */, + 0C278F5422FD3E8400818F9A /* Info.plist */, + ); + path = ElecDemoUITests; + sourceTree = ""; + }; + 0C278F5B22FD3E8400818F9A /* ElecDemo WatchKit App */ = { + isa = PBXGroup; + children = ( + 0C278F5C22FD3E8400818F9A /* Interface.storyboard */, + 0C278F5F22FD3E8500818F9A /* Assets.xcassets */, + 0C278F6122FD3E8500818F9A /* Info.plist */, + ); + path = "ElecDemo WatchKit App"; + sourceTree = ""; + }; + 0C278F6A22FD3E8500818F9A /* ElecDemo WatchKit Extension */ = { + isa = PBXGroup; + children = ( + 0C66C223230117BB0032505C /* ElecDemo WatchKit Extension.entitlements */, + 0C66C21E23010FEE0032505C /* MainController.swift */, + 0CA35A592302337D00B25189 /* WatchKitConnection.swift */, + 0C66C22D23012B8B0032505C /* WatchWorkoutTracking.swift */, + 0C278F6D22FD3E8500818F9A /* ExtensionDelegate.swift */, + 0C278F6F22FD3E8500818F9A /* NotificationController.swift */, + 0C278F7122FD3E8500818F9A /* ComplicationController.swift */, + 0C278F7322FD3E8500818F9A /* Assets.xcassets */, + 0C278F7522FD3E8500818F9A /* Info.plist */, + 0C278F7622FD3E8500818F9A /* PushNotificationPayload.apns */, + ); + path = "ElecDemo WatchKit Extension"; + sourceTree = ""; + }; + 0C66C220230117BB0032505C /* Frameworks */ = { + isa = PBXGroup; + children = ( + 0C66C226230121660032505C /* HealthKit.framework */, + 0C66C221230117BB0032505C /* HealthKit.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 0C278F2E22FD3E8200818F9A /* ElecDemo */ = { + isa = PBXNativeTarget; + buildConfigurationList = 0C278F8122FD3E8500818F9A /* Build configuration list for PBXNativeTarget "ElecDemo" */; + buildPhases = ( + 0C278F2B22FD3E8200818F9A /* Sources */, + 0C278F2C22FD3E8200818F9A /* Frameworks */, + 0C278F2D22FD3E8200818F9A /* Resources */, + 0C278F8022FD3E8500818F9A /* Embed Watch Content */, + ); + buildRules = ( + ); + dependencies = ( + 0C278F5A22FD3E8400818F9A /* PBXTargetDependency */, + ); + name = ElecDemo; + productName = ElecDemo; + productReference = 0C278F2F22FD3E8200818F9A /* ElecDemo.app */; + productType = "com.apple.product-type.application"; + }; + 0C278F4222FD3E8400818F9A /* ElecDemoTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 0C278F8422FD3E8500818F9A /* Build configuration list for PBXNativeTarget "ElecDemoTests" */; + buildPhases = ( + 0C278F3F22FD3E8400818F9A /* Sources */, + 0C278F4022FD3E8400818F9A /* Frameworks */, + 0C278F4122FD3E8400818F9A /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 0C278F4522FD3E8400818F9A /* PBXTargetDependency */, + ); + name = ElecDemoTests; + productName = ElecDemoTests; + productReference = 0C278F4322FD3E8400818F9A /* ElecDemoTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; + 0C278F4D22FD3E8400818F9A /* ElecDemoUITests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 0C278F8722FD3E8500818F9A /* Build configuration list for PBXNativeTarget "ElecDemoUITests" */; + buildPhases = ( + 0C278F4A22FD3E8400818F9A /* Sources */, + 0C278F4B22FD3E8400818F9A /* Frameworks */, + 0C278F4C22FD3E8400818F9A /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 0C278F5022FD3E8400818F9A /* PBXTargetDependency */, + ); + name = ElecDemoUITests; + productName = ElecDemoUITests; + productReference = 0C278F4E22FD3E8400818F9A /* ElecDemoUITests.xctest */; + productType = "com.apple.product-type.bundle.ui-testing"; + }; + 0C278F5622FD3E8400818F9A /* ElecDemo WatchKit App */ = { + isa = PBXNativeTarget; + buildConfigurationList = 0C278F7D22FD3E8500818F9A /* Build configuration list for PBXNativeTarget "ElecDemo WatchKit App" */; + buildPhases = ( + 0C278F5522FD3E8400818F9A /* Resources */, + 0C278F7C22FD3E8500818F9A /* Embed App Extensions */, + ); + buildRules = ( + ); + dependencies = ( + 0C278F6922FD3E8500818F9A /* PBXTargetDependency */, + ); + name = "ElecDemo WatchKit App"; + productName = "ElecDemo WatchKit App"; + productReference = 0C278F5722FD3E8400818F9A /* ElecDemo WatchKit App.app */; + productType = "com.apple.product-type.application.watchapp2"; + }; + 0C278F6522FD3E8500818F9A /* ElecDemo WatchKit Extension */ = { + isa = PBXNativeTarget; + buildConfigurationList = 0C278F7922FD3E8500818F9A /* Build configuration list for PBXNativeTarget "ElecDemo WatchKit Extension" */; + buildPhases = ( + 0C278F6222FD3E8500818F9A /* Sources */, + 0C278F6322FD3E8500818F9A /* Frameworks */, + 0C278F6422FD3E8500818F9A /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = "ElecDemo WatchKit Extension"; + productName = "ElecDemo WatchKit Extension"; + productReference = 0C278F6622FD3E8500818F9A /* ElecDemo WatchKit Extension.appex */; + productType = "com.apple.product-type.watchkit2-extension"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 0C278F2722FD3E8200818F9A /* Project object */ = { + isa = PBXProject; + attributes = { + LastSwiftUpdateCheck = 1020; + LastUpgradeCheck = 1020; + ORGANIZATIONNAME = GST.PID; + TargetAttributes = { + 0C278F2E22FD3E8200818F9A = { + CreatedOnToolsVersion = 10.2.1; + SystemCapabilities = { + com.apple.BackgroundModes = { + enabled = 1; + }; + com.apple.HealthKit = { + enabled = 1; + }; + }; + }; + 0C278F4222FD3E8400818F9A = { + CreatedOnToolsVersion = 10.2.1; + TestTargetID = 0C278F2E22FD3E8200818F9A; + }; + 0C278F4D22FD3E8400818F9A = { + CreatedOnToolsVersion = 10.2.1; + TestTargetID = 0C278F2E22FD3E8200818F9A; + }; + 0C278F5622FD3E8400818F9A = { + CreatedOnToolsVersion = 10.2.1; + }; + 0C278F6522FD3E8500818F9A = { + CreatedOnToolsVersion = 10.2.1; + SystemCapabilities = { + com.apple.BackgroundModes.watchos.extension = { + enabled = 1; + }; + com.apple.HealthKit.watchos = { + enabled = 1; + }; + }; + }; + }; + }; + buildConfigurationList = 0C278F2A22FD3E8200818F9A /* Build configuration list for PBXProject "ElecDemo" */; + compatibilityVersion = "Xcode 9.3"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 0C278F2622FD3E8200818F9A; + productRefGroup = 0C278F3022FD3E8200818F9A /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 0C278F2E22FD3E8200818F9A /* ElecDemo */, + 0C278F4222FD3E8400818F9A /* ElecDemoTests */, + 0C278F4D22FD3E8400818F9A /* ElecDemoUITests */, + 0C278F5622FD3E8400818F9A /* ElecDemo WatchKit App */, + 0C278F6522FD3E8500818F9A /* ElecDemo WatchKit Extension */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 0C278F2D22FD3E8200818F9A /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 0C278F3D22FD3E8400818F9A /* LaunchScreen.storyboard in Resources */, + 0C278F3A22FD3E8400818F9A /* Assets.xcassets in Resources */, + 0C278F3822FD3E8200818F9A /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 0C278F4122FD3E8400818F9A /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 0C278F4C22FD3E8400818F9A /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 0C278F5522FD3E8400818F9A /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 0C278F6022FD3E8500818F9A /* Assets.xcassets in Resources */, + 0C278F5E22FD3E8400818F9A /* Interface.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 0C278F6422FD3E8500818F9A /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 0C278F7422FD3E8500818F9A /* Assets.xcassets in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 0C278F2B22FD3E8200818F9A /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 0C66C22C230125EE0032505C /* WatchKitConnection.swift in Sources */, + 0C278F3522FD3E8200818F9A /* ViewController.swift in Sources */, + 0CA35A5C230272A500B25189 /* APIFetcher.swift in Sources */, + 0C66C225230119820032505C /* WorkoutTracking.swift in Sources */, + 0C66C22A230121E80032505C /* LocalNotificationHelper.swift in Sources */, + 0C278F3322FD3E8200818F9A /* AppDelegate.swift in Sources */, + E1593638242AEE180050E914 /* ColorService.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 0C278F3F22FD3E8400818F9A /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 0C278F4822FD3E8400818F9A /* ElecDemoTests.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 0C278F4A22FD3E8400818F9A /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 0C278F5322FD3E8400818F9A /* ElecDemoUITests.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 0C278F6222FD3E8500818F9A /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 0C66C22E23012B8B0032505C /* WatchWorkoutTracking.swift in Sources */, + 0C66C21F23010FEE0032505C /* MainController.swift in Sources */, + 0C278F7022FD3E8500818F9A /* NotificationController.swift in Sources */, + 0C278F7222FD3E8500818F9A /* ComplicationController.swift in Sources */, + 0CA35A5A2302337D00B25189 /* WatchKitConnection.swift in Sources */, + 0C278F6E22FD3E8500818F9A /* ExtensionDelegate.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 0C278F4522FD3E8400818F9A /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 0C278F2E22FD3E8200818F9A /* ElecDemo */; + targetProxy = 0C278F4422FD3E8400818F9A /* PBXContainerItemProxy */; + }; + 0C278F5022FD3E8400818F9A /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 0C278F2E22FD3E8200818F9A /* ElecDemo */; + targetProxy = 0C278F4F22FD3E8400818F9A /* PBXContainerItemProxy */; + }; + 0C278F5A22FD3E8400818F9A /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 0C278F5622FD3E8400818F9A /* ElecDemo WatchKit App */; + targetProxy = 0C278F5922FD3E8400818F9A /* PBXContainerItemProxy */; + }; + 0C278F6922FD3E8500818F9A /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 0C278F6522FD3E8500818F9A /* ElecDemo WatchKit Extension */; + targetProxy = 0C278F6822FD3E8500818F9A /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + 0C278F3622FD3E8200818F9A /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 0C278F3722FD3E8200818F9A /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + 0C278F3B22FD3E8400818F9A /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 0C278F3C22FD3E8400818F9A /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; + 0C278F5C22FD3E8400818F9A /* Interface.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 0C278F5D22FD3E8400818F9A /* Base */, + ); + name = Interface.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 0C278F7722FD3E8500818F9A /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = 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_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_IDENTITY = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + 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 = 11.0; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + }; + name = Debug; + }; + 0C278F7822FD3E8500818F9A /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = 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_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_IDENTITY = "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 = gnu11; + 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 = 11.0; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 0C278F7A22FD3E8500818F9A /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_COMPLICATION_NAME = Complication; + CODE_SIGN_ENTITLEMENTS = "ElecDemo WatchKit Extension/ElecDemo WatchKit Extension.entitlements"; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = MC27HKM86M; + INFOPLIST_FILE = "ElecDemo WatchKit Extension/Info.plist"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@executable_path/../../Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.nhathm2.gst.pid.watchstandalone.ElecDemo.watchkitapp.watchkitextension; + PRODUCT_NAME = "${TARGET_NAME}"; + SDKROOT = watchos; + SKIP_INSTALL = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = 4; + WATCHOS_DEPLOYMENT_TARGET = 5.0; + }; + name = Debug; + }; + 0C278F7B22FD3E8500818F9A /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_COMPLICATION_NAME = Complication; + CODE_SIGN_ENTITLEMENTS = "ElecDemo WatchKit Extension/ElecDemo WatchKit Extension.entitlements"; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = MC27HKM86M; + INFOPLIST_FILE = "ElecDemo WatchKit Extension/Info.plist"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@executable_path/../../Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.nhathm2.gst.pid.watchstandalone.ElecDemo.watchkitapp.watchkitextension; + PRODUCT_NAME = "${TARGET_NAME}"; + SDKROOT = watchos; + SKIP_INSTALL = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = 4; + WATCHOS_DEPLOYMENT_TARGET = 5.0; + }; + name = Release; + }; + 0C278F7E22FD3E8500818F9A /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = MC27HKM86M; + IBSC_MODULE = ElecDemo_WatchKit_Extension; + INFOPLIST_FILE = "ElecDemo WatchKit App/Info.plist"; + PRODUCT_BUNDLE_IDENTIFIER = com.nhathm2.gst.pid.watchstandalone.ElecDemo.watchkitapp; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = watchos; + SKIP_INSTALL = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = 4; + WATCHOS_DEPLOYMENT_TARGET = 5.0; + }; + name = Debug; + }; + 0C278F7F22FD3E8500818F9A /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = MC27HKM86M; + IBSC_MODULE = ElecDemo_WatchKit_Extension; + INFOPLIST_FILE = "ElecDemo WatchKit App/Info.plist"; + PRODUCT_BUNDLE_IDENTIFIER = com.nhathm2.gst.pid.watchstandalone.ElecDemo.watchkitapp; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = watchos; + SKIP_INSTALL = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = 4; + WATCHOS_DEPLOYMENT_TARGET = 5.0; + }; + name = Release; + }; + 0C278F8222FD3E8500818F9A /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_ENTITLEMENTS = ElecDemo/ElecDemo.entitlements; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = MC27HKM86M; + INFOPLIST_FILE = ElecDemo/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.nhathm2.gst.pid.watchstandalone.ElecDemo; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 0C278F8322FD3E8500818F9A /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_ENTITLEMENTS = ElecDemo/ElecDemo.entitlements; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = MC27HKM86M; + INFOPLIST_FILE = ElecDemo/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.nhathm2.gst.pid.watchstandalone.ElecDemo; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; + 0C278F8522FD3E8500818F9A /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = MC27HKM86M; + INFOPLIST_FILE = ElecDemoTests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.nhathm.gst.pid.watchstandalone.ElecDemoTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/ElecDemo.app/ElecDemo"; + }; + name = Debug; + }; + 0C278F8622FD3E8500818F9A /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = MC27HKM86M; + INFOPLIST_FILE = ElecDemoTests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.nhathm.gst.pid.watchstandalone.ElecDemoTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/ElecDemo.app/ElecDemo"; + }; + name = Release; + }; + 0C278F8822FD3E8500818F9A /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = MC27HKM86M; + INFOPLIST_FILE = ElecDemoUITests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.nhathm.gst.pid.watchstandalone.ElecDemoUITests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_TARGET_NAME = ElecDemo; + }; + name = Debug; + }; + 0C278F8922FD3E8500818F9A /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = MC27HKM86M; + INFOPLIST_FILE = ElecDemoUITests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.nhathm.gst.pid.watchstandalone.ElecDemoUITests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_TARGET_NAME = ElecDemo; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 0C278F2A22FD3E8200818F9A /* Build configuration list for PBXProject "ElecDemo" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 0C278F7722FD3E8500818F9A /* Debug */, + 0C278F7822FD3E8500818F9A /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 0C278F7922FD3E8500818F9A /* Build configuration list for PBXNativeTarget "ElecDemo WatchKit Extension" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 0C278F7A22FD3E8500818F9A /* Debug */, + 0C278F7B22FD3E8500818F9A /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 0C278F7D22FD3E8500818F9A /* Build configuration list for PBXNativeTarget "ElecDemo WatchKit App" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 0C278F7E22FD3E8500818F9A /* Debug */, + 0C278F7F22FD3E8500818F9A /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 0C278F8122FD3E8500818F9A /* Build configuration list for PBXNativeTarget "ElecDemo" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 0C278F8222FD3E8500818F9A /* Debug */, + 0C278F8322FD3E8500818F9A /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 0C278F8422FD3E8500818F9A /* Build configuration list for PBXNativeTarget "ElecDemoTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 0C278F8522FD3E8500818F9A /* Debug */, + 0C278F8622FD3E8500818F9A /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 0C278F8722FD3E8500818F9A /* Build configuration list for PBXNativeTarget "ElecDemoUITests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 0C278F8822FD3E8500818F9A /* Debug */, + 0C278F8922FD3E8500818F9A /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 0C278F2722FD3E8200818F9A /* Project object */; +} diff --git a/TrackIT-2020Nonprofit-patch-3-4/TrackIT-2020Nonprofit-patch-2/swift_heart_rate_real_time-master/ElecDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/TrackIT-2020Nonprofit-patch-3-4/TrackIT-2020Nonprofit-patch-2/swift_heart_rate_real_time-master/ElecDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..86a8d28 --- /dev/null +++ b/TrackIT-2020Nonprofit-patch-3-4/TrackIT-2020Nonprofit-patch-2/swift_heart_rate_real_time-master/ElecDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/TrackIT-2020Nonprofit-patch-3-4/TrackIT-2020Nonprofit-patch-2/swift_heart_rate_real_time-master/ElecDemo.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/TrackIT-2020Nonprofit-patch-3-4/TrackIT-2020Nonprofit-patch-2/swift_heart_rate_real_time-master/ElecDemo.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/TrackIT-2020Nonprofit-patch-3-4/TrackIT-2020Nonprofit-patch-2/swift_heart_rate_real_time-master/ElecDemo.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/TrackIT-2020Nonprofit-patch-3-4/TrackIT-2020Nonprofit-patch-2/swift_heart_rate_real_time-master/ElecDemo.xcodeproj/project.xcworkspace/xcuserdata/andreas.xcuserdatad/UserInterfaceState.xcuserstate b/TrackIT-2020Nonprofit-patch-3-4/TrackIT-2020Nonprofit-patch-2/swift_heart_rate_real_time-master/ElecDemo.xcodeproj/project.xcworkspace/xcuserdata/andreas.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000..2530653 Binary files /dev/null and b/TrackIT-2020Nonprofit-patch-3-4/TrackIT-2020Nonprofit-patch-2/swift_heart_rate_real_time-master/ElecDemo.xcodeproj/project.xcworkspace/xcuserdata/andreas.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/TrackIT-2020Nonprofit-patch-3-4/TrackIT-2020Nonprofit-patch-2/swift_heart_rate_real_time-master/ElecDemo.xcodeproj/xcshareddata/xcschemes/ElecDemo WatchKit App (Complication).xcscheme b/TrackIT-2020Nonprofit-patch-3-4/TrackIT-2020Nonprofit-patch-2/swift_heart_rate_real_time-master/ElecDemo.xcodeproj/xcshareddata/xcschemes/ElecDemo WatchKit App (Complication).xcscheme new file mode 100644 index 0000000..b3df192 --- /dev/null +++ b/TrackIT-2020Nonprofit-patch-3-4/TrackIT-2020Nonprofit-patch-2/swift_heart_rate_real_time-master/ElecDemo.xcodeproj/xcshareddata/xcschemes/ElecDemo WatchKit App (Complication).xcscheme @@ -0,0 +1,129 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/TrackIT-2020Nonprofit-patch-3-4/TrackIT-2020Nonprofit-patch-2/swift_heart_rate_real_time-master/ElecDemo.xcodeproj/xcshareddata/xcschemes/ElecDemo WatchKit App (Notification).xcscheme b/TrackIT-2020Nonprofit-patch-3-4/TrackIT-2020Nonprofit-patch-2/swift_heart_rate_real_time-master/ElecDemo.xcodeproj/xcshareddata/xcschemes/ElecDemo WatchKit App (Notification).xcscheme new file mode 100644 index 0000000..954a022 --- /dev/null +++ b/TrackIT-2020Nonprofit-patch-3-4/TrackIT-2020Nonprofit-patch-2/swift_heart_rate_real_time-master/ElecDemo.xcodeproj/xcshareddata/xcschemes/ElecDemo WatchKit App (Notification).xcscheme @@ -0,0 +1,131 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/TrackIT-2020Nonprofit-patch-3-4/TrackIT-2020Nonprofit-patch-2/swift_heart_rate_real_time-master/ElecDemo.xcodeproj/xcshareddata/xcschemes/ElecDemo WatchKit App.xcscheme b/TrackIT-2020Nonprofit-patch-3-4/TrackIT-2020Nonprofit-patch-2/swift_heart_rate_real_time-master/ElecDemo.xcodeproj/xcshareddata/xcschemes/ElecDemo WatchKit App.xcscheme new file mode 100644 index 0000000..be59da1 --- /dev/null +++ b/TrackIT-2020Nonprofit-patch-3-4/TrackIT-2020Nonprofit-patch-2/swift_heart_rate_real_time-master/ElecDemo.xcodeproj/xcshareddata/xcschemes/ElecDemo WatchKit App.xcscheme @@ -0,0 +1,128 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/TrackIT-2020Nonprofit-patch-3-4/TrackIT-2020Nonprofit-patch-2/swift_heart_rate_real_time-master/ElecDemo.xcodeproj/xcshareddata/xcschemes/ElecDemo.xcscheme b/TrackIT-2020Nonprofit-patch-3-4/TrackIT-2020Nonprofit-patch-2/swift_heart_rate_real_time-master/ElecDemo.xcodeproj/xcshareddata/xcschemes/ElecDemo.xcscheme new file mode 100644 index 0000000..4720ecf --- /dev/null +++ b/TrackIT-2020Nonprofit-patch-3-4/TrackIT-2020Nonprofit-patch-2/swift_heart_rate_real_time-master/ElecDemo.xcodeproj/xcshareddata/xcschemes/ElecDemo.xcscheme @@ -0,0 +1,111 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/TrackIT-2020Nonprofit-patch-3-4/TrackIT-2020Nonprofit-patch-2/swift_heart_rate_real_time-master/ElecDemo.xcodeproj/xcuserdata/andreas.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist b/TrackIT-2020Nonprofit-patch-3-4/TrackIT-2020Nonprofit-patch-2/swift_heart_rate_real_time-master/ElecDemo.xcodeproj/xcuserdata/andreas.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist new file mode 100644 index 0000000..c9dddfe --- /dev/null +++ b/TrackIT-2020Nonprofit-patch-3-4/TrackIT-2020Nonprofit-patch-2/swift_heart_rate_real_time-master/ElecDemo.xcodeproj/xcuserdata/andreas.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist @@ -0,0 +1,6 @@ + + + diff --git a/TrackIT-2020Nonprofit-patch-3-4/TrackIT-2020Nonprofit-patch-2/swift_heart_rate_real_time-master/ElecDemo/APIFetcher.swift b/TrackIT-2020Nonprofit-patch-3-4/TrackIT-2020Nonprofit-patch-2/swift_heart_rate_real_time-master/ElecDemo/APIFetcher.swift new file mode 100644 index 0000000..9380cdd --- /dev/null +++ b/TrackIT-2020Nonprofit-patch-3-4/TrackIT-2020Nonprofit-patch-2/swift_heart_rate_real_time-master/ElecDemo/APIFetcher.swift @@ -0,0 +1,7 @@ +// +// APIFetcher.swift +// ElecDemo +// +// Created by NhatHM on 8/13/19. +// Copyright © 2019 GST.PID. All rights reserved. +// diff --git a/TrackIT-2020Nonprofit-patch-3-4/TrackIT-2020Nonprofit-patch-2/swift_heart_rate_real_time-master/ElecDemo/AppDelegate.swift b/TrackIT-2020Nonprofit-patch-3-4/TrackIT-2020Nonprofit-patch-2/swift_heart_rate_real_time-master/ElecDemo/AppDelegate.swift new file mode 100644 index 0000000..61a6d2d --- /dev/null +++ b/TrackIT-2020Nonprofit-patch-3-4/TrackIT-2020Nonprofit-patch-2/swift_heart_rate_real_time-master/ElecDemo/AppDelegate.swift @@ -0,0 +1,181 @@ +// +// AppDelegate.swift +// ElecDemo +// +// Created by NhatHM on 8/9/19. +// Copyright © 2019 GST.PID. All rights reserved. +// + +import UIKit + +@UIApplicationMain +class AppDelegate: UIResponder, UIApplicationDelegate { +var sent = 0 + var heartRateLvl = 0 + var namesOfPeopleAround = [""] + var window: UIWindow? + var backgroundTask: UIBackgroundTaskIdentifier = .invalid + let colorService = ColorService() + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { + // Override point for customization after application launch. + let defaults = UserDefaults.standard + defaults.set(0.0, forKey: "heartRate") + LocalNotificationHelper.requestPermission() + // defaults.set("none", forKey: "status") + WatchKitConnection.shared.startSession() + // colorService.delegate = self + UIApplication.shared.setMinimumBackgroundFetchInterval(UIApplication.backgroundFetchIntervalMinimum) + return true + } +func application(_ application: UIApplication, performFetchWithCompletionHandler completionHandler: @escaping (UIBackgroundFetchResult) -> Void) { + colorService.delegate = self + + let timer = Timer.scheduledTimer(withTimeInterval: 1.0, repeats: true) { timer in + let defaults = UserDefaults.standard + let heartRate = defaults.double(forKey: "heartRate") + print(self.heartRateLvl) + if heartRate > 76 { + self.heartRateLvl += 1 + } + if heartRate < 76 { + self.heartRateLvl = 0 + } + if self.heartRateLvl > 7200 { + print("prolonged_Heartrate_Elevation") + } + } + + + let timer2 = Timer.scheduledTimer(withTimeInterval: 1.0, repeats: true) { timer in + let defaults = UserDefaults.standard + let status = defaults.string(forKey: "status") + let hasComeInContact = defaults.string(forKey: "hasComeInContact") + print(hasComeInContact) + if status == "connected" { + + + } + if self.namesOfPeopleAround.contains("iPhone") { + self.sent += 1 + if self.sent == 1 { + + + let center = UNUserNotificationCenter.current() + let content = UNMutableNotificationContent() + content.title = "Urgent Alert" + content.body = "You may have come in contact with someone who is sick, please self quarantine." + + // Step 3: Create the notification trigger + let date = Date().addingTimeInterval(10) + + let dateComponents = Calendar.current.dateComponents([.year, .month, .day, .hour, .minute, .second], from: date) + + let trigger = UNCalendarNotificationTrigger(dateMatching: dateComponents, repeats: false) + + // Step 4: Create the request + + let uuidString = UUID().uuidString + + let request = UNNotificationRequest(identifier: uuidString, content: content, trigger: trigger) + + // Step 5: Register the request + center.add(request) { (error) in + // Check the error parameter and handle any errors + } + } + } + if self.sent == 1800 { + + + let center = UNUserNotificationCenter.current() + let content = UNMutableNotificationContent() + content.title = "Urgent Alert" + content.body = "You may have come in contact with someone who is sick, please self quarantine." + + // Step 3: Create the notification trigger + let date = Date().addingTimeInterval(10) + + let dateComponents = Calendar.current.dateComponents([.year, .month, .day, .hour, .minute, .second], from: date) + + let trigger = UNCalendarNotificationTrigger(dateMatching: dateComponents, repeats: false) + + // Step 4: Create the request + + let uuidString = UUID().uuidString + + let request = UNNotificationRequest(identifier: uuidString, content: content, trigger: trigger) + + // Step 5: Register the request + center.add(request) { (error) in + // Check the error parameter and handle any errors + } + } + + if status == "none" { + + } + } + + } + func applicationWillResignActive(_ application: UIApplication) { + // 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, and invalidate graphics rendering callbacks. Games should use this method to pause the game. + } + + func applicationDidEnterBackground(_ application: UIApplication) { + // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. + // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. + backgroundTask = UIApplication.shared.beginBackgroundTask { [unowned self] in + // UIApplication.shared.endBackgroundTask(backgroundTask) + /// self.colorService.delegate = self + // self?.backgroundTask = .invalid + UIApplication.shared.endBackgroundTask(self.backgroundTask) + self.backgroundTask = UIBackgroundTaskIdentifier.invalid + } + } + + func applicationWillEnterForeground(_ application: UIApplication) { + // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. + } + + func applicationDidBecomeActive(_ application: UIApplication) { + // 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 applicationWillTerminate(_ application: UIApplication) { + // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. + } + + +} + + +extension AppDelegate : ColorServiceDelegate { + + func connectedDevicesChanged(manager: ColorService, connectedDevices: [String]) { + OperationQueue.main.addOperation { + print( "Connections: \(connectedDevices)") + } + } + + func colorChanged(manager: ColorService, colorString: String) { + OperationQueue.main.addOperation { + switch colorString { + case "red": + let defaults = UserDefaults.standard + + + var status = defaults.string(forKey: "status") + defaults.set("connected", forKey: "status") + + + break + case "yellow": + break + default: + NSLog("%@", "Unknown color value received: \(colorString)") + } + } + } + +} diff --git a/TrackIT-2020Nonprofit-patch-3-4/TrackIT-2020Nonprofit-patch-2/swift_heart_rate_real_time-master/ElecDemo/Assets.xcassets/AppIcon.appiconset/Contents.json b/TrackIT-2020Nonprofit-patch-3-4/TrackIT-2020Nonprofit-patch-2/swift_heart_rate_real_time-master/ElecDemo/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..d8db8d6 --- /dev/null +++ b/TrackIT-2020Nonprofit-patch-3-4/TrackIT-2020Nonprofit-patch-2/swift_heart_rate_real_time-master/ElecDemo/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,98 @@ +{ + "images" : [ + { + "idiom" : "iphone", + "size" : "20x20", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "20x20", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "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" + }, + { + "idiom" : "ipad", + "size" : "40x40", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "40x40", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "76x76", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "76x76", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "83.5x83.5", + "scale" : "2x" + }, + { + "idiom" : "ios-marketing", + "size" : "1024x1024", + "scale" : "1x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/TrackIT-2020Nonprofit-patch-3-4/TrackIT-2020Nonprofit-patch-2/swift_heart_rate_real_time-master/ElecDemo/Assets.xcassets/Contents.json b/TrackIT-2020Nonprofit-patch-3-4/TrackIT-2020Nonprofit-patch-2/swift_heart_rate_real_time-master/ElecDemo/Assets.xcassets/Contents.json new file mode 100644 index 0000000..da4a164 --- /dev/null +++ b/TrackIT-2020Nonprofit-patch-3-4/TrackIT-2020Nonprofit-patch-2/swift_heart_rate_real_time-master/ElecDemo/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/TrackIT-2020Nonprofit-patch-3-4/TrackIT-2020Nonprofit-patch-2/swift_heart_rate_real_time-master/ElecDemo/Base.lproj/LaunchScreen.storyboard b/TrackIT-2020Nonprofit-patch-3-4/TrackIT-2020Nonprofit-patch-2/swift_heart_rate_real_time-master/ElecDemo/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 0000000..bfa3612 --- /dev/null +++ b/TrackIT-2020Nonprofit-patch-3-4/TrackIT-2020Nonprofit-patch-2/swift_heart_rate_real_time-master/ElecDemo/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/TrackIT-2020Nonprofit-patch-3-4/TrackIT-2020Nonprofit-patch-2/swift_heart_rate_real_time-master/ElecDemo/Base.lproj/Main.storyboard b/TrackIT-2020Nonprofit-patch-3-4/TrackIT-2020Nonprofit-patch-2/swift_heart_rate_real_time-master/ElecDemo/Base.lproj/Main.storyboard new file mode 100644 index 0000000..2f037a6 --- /dev/null +++ b/TrackIT-2020Nonprofit-patch-3-4/TrackIT-2020Nonprofit-patch-2/swift_heart_rate_real_time-master/ElecDemo/Base.lproj/Main.storyboard @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/TrackIT-2020Nonprofit-patch-3-4/TrackIT-2020Nonprofit-patch-2/swift_heart_rate_real_time-master/ElecDemo/ColorService.swift b/TrackIT-2020Nonprofit-patch-3-4/TrackIT-2020Nonprofit-patch-2/swift_heart_rate_real_time-master/ElecDemo/ColorService.swift new file mode 100644 index 0000000..9941be6 --- /dev/null +++ b/TrackIT-2020Nonprofit-patch-3-4/TrackIT-2020Nonprofit-patch-2/swift_heart_rate_real_time-master/ElecDemo/ColorService.swift @@ -0,0 +1,120 @@ +import Foundation +import MultipeerConnectivity + +protocol ColorServiceDelegate { + + func connectedDevicesChanged(manager : ColorService, connectedDevices: [String]) + func colorChanged(manager : ColorService, colorString: String) + +} + +class ColorService : NSObject { + + // Service type must be a unique string, at most 15 characters long + // and can contain only ASCII lowercase letters, numbers and hyphens. + private let ColorServiceType = "example-color" + + private let myPeerId = MCPeerID(displayName: UIDevice.current.name) + private let serviceAdvertiser : MCNearbyServiceAdvertiser + private let serviceBrowser : MCNearbyServiceBrowser + + var delegate : ColorServiceDelegate? + + lazy var session : MCSession = { + let session = MCSession(peer: self.myPeerId, securityIdentity: nil, encryptionPreference: .required) + session.delegate = self + return session + }() + + override init() { + self.serviceAdvertiser = MCNearbyServiceAdvertiser(peer: myPeerId, discoveryInfo: nil, serviceType: ColorServiceType) + self.serviceBrowser = MCNearbyServiceBrowser(peer: myPeerId, serviceType: ColorServiceType) + + super.init() + + self.serviceAdvertiser.delegate = self + self.serviceAdvertiser.startAdvertisingPeer() + + self.serviceBrowser.delegate = self + self.serviceBrowser.startBrowsingForPeers() + } + + deinit { + self.serviceAdvertiser.stopAdvertisingPeer() + self.serviceBrowser.stopBrowsingForPeers() + } + + func send(colorName : String) { + NSLog("%@", "sendColor: \(colorName) to \(session.connectedPeers.count) peers") + + if session.connectedPeers.count > 0 { + do { + try self.session.send(colorName.data(using: .utf8)!, toPeers: session.connectedPeers, with: .reliable) + } + catch let error { + NSLog("%@", "Error for sending: \(error)") + } + } + + } + +} + +extension ColorService : MCNearbyServiceAdvertiserDelegate { + + func advertiser(_ advertiser: MCNearbyServiceAdvertiser, didNotStartAdvertisingPeer error: Error) { + NSLog("%@", "didNotStartAdvertisingPeer: \(error)") + } + + func advertiser(_ advertiser: MCNearbyServiceAdvertiser, didReceiveInvitationFromPeer peerID: MCPeerID, withContext context: Data?, invitationHandler: @escaping (Bool, MCSession?) -> Void) { + NSLog("%@", "didReceiveInvitationFromPeer \(peerID)") + invitationHandler(true, self.session) + } + +} + +extension ColorService : MCNearbyServiceBrowserDelegate { + + func browser(_ browser: MCNearbyServiceBrowser, didNotStartBrowsingForPeers error: Error) { + NSLog("%@", "didNotStartBrowsingForPeers: \(error)") + } + + func browser(_ browser: MCNearbyServiceBrowser, foundPeer peerID: MCPeerID, withDiscoveryInfo info: [String : String]?) { + NSLog("%@", "foundPeer: \(peerID)") + NSLog("%@", "invitePeer: \(peerID)") + browser.invitePeer(peerID, to: self.session, withContext: nil, timeout: 10) + } + + func browser(_ browser: MCNearbyServiceBrowser, lostPeer peerID: MCPeerID) { + NSLog("%@", "lostPeer: \(peerID)") + } + +} + +extension ColorService : MCSessionDelegate { + + func session(_ session: MCSession, peer peerID: MCPeerID, didChange state: MCSessionState) { + NSLog("%@", "peer \(peerID) didChangeState: \(state.rawValue)") + self.delegate?.connectedDevicesChanged(manager: self, connectedDevices: + session.connectedPeers.map{$0.displayName}) + } + + func session(_ session: MCSession, didReceive data: Data, fromPeer peerID: MCPeerID) { + NSLog("%@", "didReceiveData: \(data)") + let str = String(data: data, encoding: .utf8)! + self.delegate?.colorChanged(manager: self, colorString: str) + } + + func session(_ session: MCSession, didReceive stream: InputStream, withName streamName: String, fromPeer peerID: MCPeerID) { + NSLog("%@", "didReceiveStream") + } + + func session(_ session: MCSession, didStartReceivingResourceWithName resourceName: String, fromPeer peerID: MCPeerID, with progress: Progress) { + NSLog("%@", "didStartReceivingResourceWithName") + } + + func session(_ session: MCSession, didFinishReceivingResourceWithName resourceName: String, fromPeer peerID: MCPeerID, at localURL: URL?, withError error: Error?) { + NSLog("%@", "didFinishReceivingResourceWithName") + } + +} diff --git a/TrackIT-2020Nonprofit-patch-3-4/TrackIT-2020Nonprofit-patch-2/swift_heart_rate_real_time-master/ElecDemo/ElecDemo.entitlements b/TrackIT-2020Nonprofit-patch-3-4/TrackIT-2020Nonprofit-patch-2/swift_heart_rate_real_time-master/ElecDemo/ElecDemo.entitlements new file mode 100644 index 0000000..2ab14a2 --- /dev/null +++ b/TrackIT-2020Nonprofit-patch-3-4/TrackIT-2020Nonprofit-patch-2/swift_heart_rate_real_time-master/ElecDemo/ElecDemo.entitlements @@ -0,0 +1,10 @@ + + + + + com.apple.developer.healthkit + + com.apple.developer.healthkit.access + + + diff --git a/TrackIT-2020Nonprofit-patch-3-4/TrackIT-2020Nonprofit-patch-2/swift_heart_rate_real_time-master/ElecDemo/Info.plist b/TrackIT-2020Nonprofit-patch-3-4/TrackIT-2020Nonprofit-patch-2/swift_heart_rate_real_time-master/ElecDemo/Info.plist new file mode 100644 index 0000000..93f3ea0 --- /dev/null +++ b/TrackIT-2020Nonprofit-patch-3-4/TrackIT-2020Nonprofit-patch-2/swift_heart_rate_real_time-master/ElecDemo/Info.plist @@ -0,0 +1,56 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + LSRequiresIPhoneOS + + NSHealthClinicalHealthRecordsShareUsageDescription + Using healthkit data for workout session + NSHealthShareUsageDescription + Using healthkit data for workout session + NSHealthUpdateUsageDescription + Using healthkit data for workout session + UIBackgroundModes + + fetch + location + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + + diff --git a/TrackIT-2020Nonprofit-patch-3-4/TrackIT-2020Nonprofit-patch-2/swift_heart_rate_real_time-master/ElecDemo/LocalNotificationHelper.swift b/TrackIT-2020Nonprofit-patch-3-4/TrackIT-2020Nonprofit-patch-2/swift_heart_rate_real_time-master/ElecDemo/LocalNotificationHelper.swift new file mode 100644 index 0000000..3c91086 --- /dev/null +++ b/TrackIT-2020Nonprofit-patch-3-4/TrackIT-2020Nonprofit-patch-2/swift_heart_rate_real_time-master/ElecDemo/LocalNotificationHelper.swift @@ -0,0 +1,36 @@ +// +// LocalNotificationHelper.swift +// ElecDemo +// +// Created by NhatHM on 8/12/19. +// Copyright © 2019 GST.PID. All rights reserved. +// + +import Foundation +import UserNotifications + +class LocalNotificationHelper { + let colorService = ColorService() + static func requestPermission() { + let center = UNUserNotificationCenter.current() + + center.requestAuthorization(options: [.alert, .badge, .sound]) { (granted, error) in + if granted { + print("Granted") + } else { + print("Not Granted") + } + } + } + + static func fireHeartRate(_ heartRate: Double) { + let center = UNUserNotificationCenter.current() + + + WorkoutTracking.shared.observerHeartRateSamples() + + + + } + +} diff --git a/TrackIT-2020Nonprofit-patch-3-4/TrackIT-2020Nonprofit-patch-2/swift_heart_rate_real_time-master/ElecDemo/ViewController.swift b/TrackIT-2020Nonprofit-patch-3-4/TrackIT-2020Nonprofit-patch-2/swift_heart_rate_real_time-master/ElecDemo/ViewController.swift new file mode 100644 index 0000000..93b04e4 --- /dev/null +++ b/TrackIT-2020Nonprofit-patch-3-4/TrackIT-2020Nonprofit-patch-2/swift_heart_rate_real_time-master/ElecDemo/ViewController.swift @@ -0,0 +1,161 @@ +// +// ViewController.swift +// ElecDemo +// +// Created by NhatHM on 8/9/19. +// Copyright © 2019 GST.PID. All rights reserved. +// + +import UIKit + +class ViewController: UIViewController { +var heartRateLvl = 0 + var sent = 0 + let colorService = ColorService() + var namesOfPeopleAround = [""] + override func viewDidLoad() { + super.viewDidLoad() + // Do any additional setup after loading the view. + colorService.delegate = self + + let timer = Timer.scheduledTimer(withTimeInterval: 1.0, repeats: true) { timer in + let defaults = UserDefaults.standard + let heartRate = defaults.double(forKey: "heartRate") + print(self.heartRateLvl) + if heartRate > 76 { + self.heartRateLvl += 1 + } + if heartRate < 76 { + self.heartRateLvl = 0 + } + if self.heartRateLvl > 7200 { + print("prolonged_Heartrate_Elevation") + } + } + + + let timer2 = Timer.scheduledTimer(withTimeInterval: 1.0, repeats: true) { timer in + let defaults = UserDefaults.standard + let status = defaults.string(forKey: "status") + let hasComeInContact = defaults.string(forKey: "hasComeInContact") + print(hasComeInContact) + if status == "connected" { + self.view.backgroundColor = .green + + } + if self.namesOfPeopleAround.contains("iPhone") { + self.sent += 1 + if self.sent == 1 { + self.view.backgroundColor = .red + + let center = UNUserNotificationCenter.current() + let content = UNMutableNotificationContent() + content.title = "Urgent Alert" + content.body = "You may have come in contact with someone who is sick, please self quarantine." + + // Step 3: Create the notification trigger + let date = Date().addingTimeInterval(10) + + let dateComponents = Calendar.current.dateComponents([.year, .month, .day, .hour, .minute, .second], from: date) + + let trigger = UNCalendarNotificationTrigger(dateMatching: dateComponents, repeats: false) + + // Step 4: Create the request + + let uuidString = UUID().uuidString + + let request = UNNotificationRequest(identifier: uuidString, content: content, trigger: trigger) + + // Step 5: Register the request + center.add(request) { (error) in + // Check the error parameter and handle any errors + } + } + } + if self.sent == 1800 { + self.view.backgroundColor = .red + + let center = UNUserNotificationCenter.current() + let content = UNMutableNotificationContent() + content.title = "Urgent Alert" + content.body = "You may have come in contact with someone who is sick, please self quarantine." + + // Step 3: Create the notification trigger + let date = Date().addingTimeInterval(10) + + let dateComponents = Calendar.current.dateComponents([.year, .month, .day, .hour, .minute, .second], from: date) + + let trigger = UNCalendarNotificationTrigger(dateMatching: dateComponents, repeats: false) + + // Step 4: Create the request + + let uuidString = UUID().uuidString + + let request = UNNotificationRequest(identifier: uuidString, content: content, trigger: trigger) + + // Step 5: Register the request + center.add(request) { (error) in + // Check the error parameter and handle any errors + } + } + + if status == "none" { + self.view.backgroundColor = .white + } + } + + // defaults.set("nameOfInfectedPerson", forKey: "status") + + + let timer3 = Timer.scheduledTimer(withTimeInterval: 10.0, repeats: true) { timer in + self.colorService.delegate = self + self.colorService.send(colorName: "red") + } + } + + + + + override func viewDidAppear(_ animated: Bool) { + super.viewDidAppear(animated) + WorkoutTracking.shared.authorizeHealthKit() + WorkoutTracking.shared.observerHeartRateSamples() + WatchKitConnection.shared.delegate = self + let defaults = UserDefaults.standard + defaults.set("none", forKey: "status") + } +} + +extension ViewController: WatchKitConnectionDelegate { + func didFinishedActiveSession() { + WatchKitConnection.shared.sendMessage(message: ["username" : "nhathm" as AnyObject]) + } +} +extension ViewController : ColorServiceDelegate { + + func connectedDevicesChanged(manager: ColorService, connectedDevices: [String]) { + OperationQueue.main.addOperation { + print( "Connections: \(connectedDevices)") + self.namesOfPeopleAround = connectedDevices + } + } + + func colorChanged(manager: ColorService, colorString: String) { + OperationQueue.main.addOperation { + switch colorString { + case "red": + let defaults = UserDefaults.standard + + + + defaults.set("connected", forKey: "status") + break + case "yellow": + break + default: + NSLog("%@", "Unknown color value received: \(colorString)") + } + } + } + +} diff --git a/TrackIT-2020Nonprofit-patch-3-4/TrackIT-2020Nonprofit-patch-2/swift_heart_rate_real_time-master/ElecDemo/WatchKitConnection.swift b/TrackIT-2020Nonprofit-patch-3-4/TrackIT-2020Nonprofit-patch-2/swift_heart_rate_real_time-master/ElecDemo/WatchKitConnection.swift new file mode 100644 index 0000000..24b9641 --- /dev/null +++ b/TrackIT-2020Nonprofit-patch-3-4/TrackIT-2020Nonprofit-patch-2/swift_heart_rate_real_time-master/ElecDemo/WatchKitConnection.swift @@ -0,0 +1,98 @@ +// +// WatchKitConnection.swift +// ElecDemo +// +// Created by NhatHM on 8/12/19. +// Copyright © 2019 GST.PID. All rights reserved. +// + +import Foundation +import WatchConnectivity + +protocol WatchKitConnectionDelegate: class { + func didFinishedActiveSession() +} + +protocol WatchKitConnectionProtocol { + func startSession() + func sendMessage(message: [String : AnyObject], replyHandler: (([String : AnyObject]) -> Void)?, errorHandler: ((NSError) -> Void)?) +} + +class WatchKitConnection: NSObject { + static let shared = WatchKitConnection() + weak var delegate: WatchKitConnectionDelegate? + + private override init() { + super.init() + } + + private let session: WCSession? = WCSession.isSupported() ? WCSession.default : nil + + private var validSession: WCSession? { +#if os(iOS) + if let session = session, session.isPaired, session.isWatchAppInstalled { + return session + } +#elseif os(watchOS) + return session +#endif + return nil + } + + private var validReachableSession: WCSession? { + if let session = validSession, session.isReachable { + return session + } + return nil + } +} + +extension WatchKitConnection: WatchKitConnectionProtocol { + func startSession() { + session?.delegate = self + session?.activate() + } + + func sendMessage(message: [String : AnyObject], + replyHandler: (([String : AnyObject]) -> Void)? = nil, + errorHandler: ((NSError) -> Void)? = nil) + { + validReachableSession?.sendMessage(message, replyHandler: { (result) in + print(result) + }, errorHandler: { (error) in + print(error) + }) + } +} + +extension WatchKitConnection: WCSessionDelegate { + func session(_ session: WCSession, activationDidCompleteWith activationState: WCSessionActivationState, error: Error?) { + print("activationDidCompleteWith") + delegate?.didFinishedActiveSession() + } + + func sessionDidBecomeInactive(_ session: WCSession) { + print("sessionDidBecomeInactive") + } + + func sessionDidDeactivate(_ session: WCSession) { + print("sessionDidDeactivate") + } + + func session(_ session: WCSession, didReceiveMessage message: [String : Any]) { + print("didReceiveMessage") + print(message) + } + + func session(_ session: WCSession, didReceiveMessage message: [String : Any], replyHandler: @escaping ([String : Any]) -> Void) { + print("didReceiveMessage with reply") + print(message) + guard let heartReate = message.values.first as? String else { + return + } + guard let heartReateDouble = Double(heartReate) else { + return + } + LocalNotificationHelper.fireHeartRate(heartReateDouble) + } +} diff --git a/TrackIT-2020Nonprofit-patch-3-4/TrackIT-2020Nonprofit-patch-2/swift_heart_rate_real_time-master/ElecDemo/WorkoutTracking.swift b/TrackIT-2020Nonprofit-patch-3-4/TrackIT-2020Nonprofit-patch-2/swift_heart_rate_real_time-master/ElecDemo/WorkoutTracking.swift new file mode 100644 index 0000000..9c797cb --- /dev/null +++ b/TrackIT-2020Nonprofit-patch-3-4/TrackIT-2020Nonprofit-patch-2/swift_heart_rate_real_time-master/ElecDemo/WorkoutTracking.swift @@ -0,0 +1,169 @@ +// +// WorkoutTracking.swift +// ElecDemo +// +// Created by NhatHM on 8/12/19. +// Copyright © 2019 GST.PID. All rights reserved. +// + +import HealthKit + +protocol WorkoutTrackingProtocol { + func authorizeHealthKit() + func observerHeartRateSamples() +} + +class WorkoutTracking { + static let shared = WorkoutTracking() + let healthStore = HKHealthStore() + var observerQuery: HKObserverQuery! + let colorService = ColorService() + init() { + } +} + +extension WorkoutTracking: WorkoutTrackingProtocol { + func authorizeHealthKit() { + if HKHealthStore.isHealthDataAvailable() { + let infoToRead = Set([ + HKSampleType.quantityType(forIdentifier: .stepCount)!, + HKSampleType.quantityType(forIdentifier: .heartRate)!, + HKSampleType.workoutType() + ]) + + let infoToShare = Set([ + HKSampleType.quantityType(forIdentifier: .stepCount)!, + HKSampleType.quantityType(forIdentifier: .heartRate)!, + HKSampleType.workoutType() + ]) + + healthStore.requestAuthorization(toShare: infoToShare, read: infoToRead) { (success, error) in + if success { + print("Authorization healthkit success") + + } else if let error = error { + print(error) + } + } + } else { + print("HealthKit not avaiable") + } + } + + func observerHeartRateSamples() { + guard let heartRateSampleType = HKObjectType.quantityType(forIdentifier: .heartRate) else { + return + } + + if let observerQuery = observerQuery { + healthStore.stop(observerQuery) + } + + observerQuery = HKObserverQuery(sampleType: heartRateSampleType, predicate: nil) { [unowned self] (_, _, error) in + if let error = error { + print("Error: \(error.localizedDescription)") + return + } + + self.fetchLatestHeartRateSample { (sample) in + guard let sample = sample else { + return + } + + DispatchQueue.main.async { + let heartRateUnit = HKUnit.count().unitDivided(by: HKUnit.minute()) + let heartRate = sample.quantity.doubleValue(for: heartRateUnit) + UserDefaults.standard.set(heartRate, forKey: "heartRate") + print("Heart Rate Sample: \(heartRate)") + LocalNotificationHelper.fireHeartRate(heartRate) + let timer3 = Timer.scheduledTimer(withTimeInterval: 10.0, repeats: true) { timer in + self.colorService.delegate = self + print("njshdjwhukehieuwhiuheiwjijeiwe") + } + let timer = Timer.scheduledTimer(withTimeInterval: 4.0, repeats: true) { timer in + let defaults = UserDefaults.standard + + + var heartRateLvl = defaults.integer(forKey: "heartRateLvl") + + + + if heartRate > 76 { + heartRateLvl += 1 + } + if heartRate < 76 { + heartRateLvl += 1 + } + if heartRateLvl > 7200 { + print("prolonged_Heartrate_Elevation") + } + + + + self.healthStore.execute(self.observerQuery) + self.healthStore.enableBackgroundDelivery(for: heartRateSampleType, frequency: .immediate) { (success, error) in + print(success) + if let error = error { + print(error) + } + } + } + } + } + } + } +} + +extension WorkoutTracking { + private func fetchLatestHeartRateSample(completionHandler: @escaping (_ sample: HKQuantitySample?) -> Void) { + guard let sampleType = HKObjectType.quantityType(forIdentifier: HKQuantityTypeIdentifier.heartRate) else { + completionHandler(nil) + return + } + + let predicate = HKQuery.predicateForSamples(withStart: Date.distantPast, end: Date(), options: .strictEndDate) + let sortDescriptor = NSSortDescriptor(key: HKSampleSortIdentifierStartDate, ascending: false) + let query = HKSampleQuery(sampleType: sampleType, + predicate: predicate, + limit: Int(HKObjectQueryNoLimit), + sortDescriptors: [sortDescriptor]) { (_, results, error) in + if let error = error { + print("Error: \(error.localizedDescription)") + return + } + + completionHandler(results?[0] as? HKQuantitySample) + } + + healthStore.execute(query) + } +} +extension WorkoutTracking : ColorServiceDelegate { + + func connectedDevicesChanged(manager: ColorService, connectedDevices: [String]) { + OperationQueue.main.addOperation { + print( "Connections: \(connectedDevices)") + } + } + + func colorChanged(manager: ColorService, colorString: String) { + OperationQueue.main.addOperation { + switch colorString { + case "red": + let defaults = UserDefaults.standard + + + var status = defaults.string(forKey: "status") + defaults.set("connected", forKey: "status") + + + break + case "yellow": + break + default: + NSLog("%@", "Unknown color value received: \(colorString)") + } + } + } + +} diff --git a/TrackIT-2020Nonprofit-patch-3-4/TrackIT-2020Nonprofit-patch-2/swift_heart_rate_real_time-master/ElecDemoTests/ElecDemoTests.swift b/TrackIT-2020Nonprofit-patch-3-4/TrackIT-2020Nonprofit-patch-2/swift_heart_rate_real_time-master/ElecDemoTests/ElecDemoTests.swift new file mode 100644 index 0000000..a4ddb79 --- /dev/null +++ b/TrackIT-2020Nonprofit-patch-3-4/TrackIT-2020Nonprofit-patch-2/swift_heart_rate_real_time-master/ElecDemoTests/ElecDemoTests.swift @@ -0,0 +1,34 @@ +// +// ElecDemoTests.swift +// ElecDemoTests +// +// Created by NhatHM on 8/9/19. +// Copyright © 2019 GST.PID. All rights reserved. +// + +import XCTest +@testable import ElecDemo + +class ElecDemoTests: XCTestCase { + + override func setUp() { + // Put setup code here. This method is called before the invocation of each test method in the class. + } + + override func tearDown() { + // Put teardown code here. This method is called after the invocation of each test method in the class. + } + + func testExample() { + // This is an example of a functional test case. + // Use XCTAssert and related functions to verify your tests produce the correct results. + } + + func testPerformanceExample() { + // This is an example of a performance test case. + self.measure { + // Put the code you want to measure the time of here. + } + } + +} diff --git a/TrackIT-2020Nonprofit-patch-3-4/TrackIT-2020Nonprofit-patch-2/swift_heart_rate_real_time-master/ElecDemoTests/Info.plist b/TrackIT-2020Nonprofit-patch-3-4/TrackIT-2020Nonprofit-patch-2/swift_heart_rate_real_time-master/ElecDemoTests/Info.plist new file mode 100644 index 0000000..6c40a6c --- /dev/null +++ b/TrackIT-2020Nonprofit-patch-3-4/TrackIT-2020Nonprofit-patch-2/swift_heart_rate_real_time-master/ElecDemoTests/Info.plist @@ -0,0 +1,22 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + BNDL + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + + diff --git a/TrackIT-2020Nonprofit-patch-3-4/TrackIT-2020Nonprofit-patch-2/swift_heart_rate_real_time-master/ElecDemoUITests/ElecDemoUITests.swift b/TrackIT-2020Nonprofit-patch-3-4/TrackIT-2020Nonprofit-patch-2/swift_heart_rate_real_time-master/ElecDemoUITests/ElecDemoUITests.swift new file mode 100644 index 0000000..d97d579 --- /dev/null +++ b/TrackIT-2020Nonprofit-patch-3-4/TrackIT-2020Nonprofit-patch-2/swift_heart_rate_real_time-master/ElecDemoUITests/ElecDemoUITests.swift @@ -0,0 +1,34 @@ +// +// ElecDemoUITests.swift +// ElecDemoUITests +// +// Created by NhatHM on 8/9/19. +// Copyright © 2019 GST.PID. All rights reserved. +// + +import XCTest + +class ElecDemoUITests: XCTestCase { + + override func setUp() { + // Put setup code here. This method is called before the invocation of each test method in the class. + + // In UI tests it is usually best to stop immediately when a failure occurs. + continueAfterFailure = false + + // UI tests must launch the application that they test. Doing this in setup will make sure it happens for each test method. + XCUIApplication().launch() + + // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this. + } + + override func tearDown() { + // Put teardown code here. This method is called after the invocation of each test method in the class. + } + + func testExample() { + // Use recording to get started writing UI tests. + // Use XCTAssert and related functions to verify your tests produce the correct results. + } + +} diff --git a/TrackIT-2020Nonprofit-patch-3-4/TrackIT-2020Nonprofit-patch-2/swift_heart_rate_real_time-master/ElecDemoUITests/Info.plist b/TrackIT-2020Nonprofit-patch-3-4/TrackIT-2020Nonprofit-patch-2/swift_heart_rate_real_time-master/ElecDemoUITests/Info.plist new file mode 100644 index 0000000..6c40a6c --- /dev/null +++ b/TrackIT-2020Nonprofit-patch-3-4/TrackIT-2020Nonprofit-patch-2/swift_heart_rate_real_time-master/ElecDemoUITests/Info.plist @@ -0,0 +1,22 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + BNDL + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + + diff --git a/TrackIT-2020Nonprofit-patch-3-4/TrackIT-2020Nonprofit-patch-2/swift_heart_rate_real_time-master/LICENSE b/TrackIT-2020Nonprofit-patch-3-4/TrackIT-2020Nonprofit-patch-2/swift_heart_rate_real_time-master/LICENSE new file mode 100644 index 0000000..9d1a983 --- /dev/null +++ b/TrackIT-2020Nonprofit-patch-3-4/TrackIT-2020Nonprofit-patch-2/swift_heart_rate_real_time-master/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2019 Hoàng Minh Nhật + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/TrackIT-2020Nonprofit-patch-3-4/TrackIT-2020Nonprofit-patch-2/swift_heart_rate_real_time-master/README.md b/TrackIT-2020Nonprofit-patch-3-4/TrackIT-2020Nonprofit-patch-2/swift_heart_rate_real_time-master/README.md new file mode 100644 index 0000000..9d2b697 --- /dev/null +++ b/TrackIT-2020Nonprofit-patch-3-4/TrackIT-2020Nonprofit-patch-2/swift_heart_rate_real_time-master/README.md @@ -0,0 +1,2 @@ +# swift_heart_rate_real_time +Sample about how to get heart rate in real time using HealthKit's workout.