File tree Expand file tree Collapse file tree 8 files changed +15
-11
lines changed
iOS Steps Watch Extension Expand file tree Collapse file tree 8 files changed +15
-11
lines changed Original file line number Diff line number Diff line change 1- 541
1+ 545
Original file line number Diff line number Diff line change 1919 <key >CFBundleShortVersionString </key >
2020 <string >1.0 </string >
2121 <key >CFBundleVersion </key >
22- <string >541 </string >
22+ <string >545 </string >
2323 <key >NSExtension </key >
2424 <dict >
2525 <key >NSExtensionMainStoryboard </key >
Original file line number Diff line number Diff line change 1919 <key >CFBundleShortVersionString </key >
2020 <string >1.0 </string >
2121 <key >CFBundleVersion </key >
22- <string >541 </string >
22+ <string >545 </string >
2323 <key >NSExtension </key >
2424 <dict >
2525 <key >NSExtensionAttributes </key >
Original file line number Diff line number Diff line change 1919 <key >CFBundleShortVersionString </key >
2020 <string >1.0 </string >
2121 <key >CFBundleVersion </key >
22- <string >541 </string >
22+ <string >545 </string >
2323 <key >UIBackgroundModes </key >
2424 <array />
2525 <key >UISupportedInterfaceOrientations </key >
Original file line number Diff line number Diff line change 2121 <rect key =" frame" x =" 0.0" y =" 0.0" width =" 320" height =" 568" />
2222 <autoresizingMask key =" autoresizingMask" widthSizable =" YES" heightSizable =" YES" />
2323 <subviews >
24- <label opaque =" NO" userInteractionEnabled =" NO" contentMode =" left" horizontalHuggingPriority =" 251" verticalHuggingPriority =" 251" text =" Build: 541 (7291a01 )" textAlignment =" center" lineBreakMode =" tailTruncation" baselineAdjustment =" alignBaselines" adjustsFontSizeToFit =" NO" translatesAutoresizingMaskIntoConstraints =" NO" id =" yhA-lX-4Of" userLabel =" APP_VERSION" >
24+ <label opaque =" NO" userInteractionEnabled =" NO" contentMode =" left" horizontalHuggingPriority =" 251" verticalHuggingPriority =" 251" text =" Build: 545 (23bf8b5 )" textAlignment =" center" lineBreakMode =" tailTruncation" baselineAdjustment =" alignBaselines" adjustsFontSizeToFit =" NO" translatesAutoresizingMaskIntoConstraints =" NO" id =" yhA-lX-4Of" userLabel =" APP_VERSION" >
2525 <rect key =" frame" x =" 132.5" y =" 527" width =" 55.5" height =" 21" />
2626 <fontDescription key =" fontDescription" type =" system" pointSize =" 17" />
2727 <nil key =" textColor" />
Original file line number Diff line number Diff line change 2121 <rect key =" frame" x =" 0.0" y =" 0.0" width =" 320" height =" 568" />
2222 <autoresizingMask key =" autoresizingMask" widthSizable =" YES" heightSizable =" YES" />
2323 <subviews >
24- <label opaque =" NO" userInteractionEnabled =" NO" contentMode =" left" horizontalHuggingPriority =" 251" verticalHuggingPriority =" 251" text =" Build: 540 (7291a01 )" textAlignment =" center" lineBreakMode =" tailTruncation" baselineAdjustment =" alignBaselines" adjustsFontSizeToFit =" NO" translatesAutoresizingMaskIntoConstraints =" NO" id =" yhA-lX-4Of" userLabel =" APP_VERSION" >
24+ <label opaque =" NO" userInteractionEnabled =" NO" contentMode =" left" horizontalHuggingPriority =" 251" verticalHuggingPriority =" 251" text =" Build: 544 (23bf8b5 )" textAlignment =" center" lineBreakMode =" tailTruncation" baselineAdjustment =" alignBaselines" adjustsFontSizeToFit =" NO" translatesAutoresizingMaskIntoConstraints =" NO" id =" yhA-lX-4Of" userLabel =" APP_VERSION" >
2525 <rect key =" frame" x =" 132.5" y =" 527" width =" 55.5" height =" 21" />
2626 <fontDescription key =" fontDescription" type =" system" pointSize =" 17" />
2727 <nil key =" textColor" />
Original file line number Diff line number Diff line change @@ -168,10 +168,15 @@ class HealthKitManager {
168168 func updateHourlyStepsArray( completion: @escaping ( Double ? ) -> ( ) ) {
169169 print ( NSURL ( fileURLWithPath: " \( #file) " ) . lastPathComponent!, " \( #function) " )
170170
171- let anchorDate = cal. date ( byAdding: . day, value: - 1 , to: cal. startOfDay ( for: Date ( ) ) )
172-
171+ // longer interval, so less step periods initially
173172 var interval = DateComponents ( )
174- interval. minute = 5
173+ if ( hourlySteps. count == 0 ) {
174+ interval. minute = 60
175+ } else {
176+ interval. minute = 5
177+ }
178+
179+ let anchorDate = cal. date ( byAdding: . day, value: - 1 , to: cal. startOfDay ( for: Date ( ) ) )
175180
176181 let type = HKQuantityType . quantityType ( forIdentifier: HKQuantityTypeIdentifier . stepCount)
177182
@@ -218,7 +223,6 @@ class HealthKitManager {
218223 // now call updates in viewControllers
219224 NotificationCenter . default. post ( name: NSNotification . Name ( rawValue: healthKitDidUpdateNotification1) , object: nil )
220225 NotificationCenter . default. post ( name: NSNotification . Name ( rawValue: healthKitDidUpdateNotification2) , object: nil )
221-
222226
223227 completion ( 0.0 )
224228 }
Original file line number Diff line number Diff line change 2828 </dict >
2929 </array >
3030 <key >CFBundleVersion </key >
31- <string >541 </string >
31+ <string >545 </string >
3232 <key >LSRequiresIPhoneOS </key >
3333 <true />
3434 <key >NSHealthShareUsageDescription </key >
You can’t perform that action at this time.
0 commit comments