Skip to content

Commit 0b7cea3

Browse files
Steve TreaseSteve Trease
authored andcommitted
Initial chart date is based on hourly data. Refreshes on five minute period.
1 parent 23bf8b5 commit 0b7cea3

File tree

8 files changed

+15
-11
lines changed

8 files changed

+15
-11
lines changed

build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
541
1+
545

iOS Steps Today/Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
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>

iOS Steps Watch Extension/Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
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>

iOS Steps Watch/Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
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>

iOS Steps/Base.lproj/LaunchScreen.storyboard

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
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"/>

iOS Steps/Base.lproj/LaunchScreen.storyboardbak

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
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"/>

iOS Steps/HealthKitManager.swift

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff 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
}

iOS Steps/Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
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>

0 commit comments

Comments
 (0)