Post

Replies

Boosts

Views

Activity

[WatchOS] Error while trying to insertRouteData into HKWorkoutRouteBuilder
I've ran into an error with the insertRouteData function of the HKWorkoutRouteBuilder that I can't seem to find any information on. The error is "Unable to find location series 1A193D3B-AFF5-41D8-A967-B1BE08D9F543 during data insert.". It seems to only happen when trying to insert very long routes, in the most recent case it was a 5 hour bike ride with 5900 samples. I save all the route data in a sqlite table as backup and after checking out the data there isn't any red flags as to why it would not insert correctly. Has anyone seen this before and could offer some insight or point me in the right direction to find the source of the error?
1
0
973
Nov ’21
[WatchOS] Updating UI while display in Always On
I've been trying to update the UI while in the always on state and can't seem to get it to work. My app is a workout app so from the documentation it seems like I should still be able to update the UI just at a lower frequency. From the documentation: "Apps running a background session, such as a workout session or background audio session, remain onscreen as long as the session is active. Unlike frontmost apps, apps running a background session can continue to update their user interface; however, to save battery life, the system reduces the update frequency." All of the documentation for designing for Always On seems to just be in SwiftUI and I was able to get a demo working without issue using the TimelineView and PeriodicTimelineSchedule seen here https://developer.apple.com/documentation/watchkit/designing_your_app_for_the_always_on_state. Is there anything I can do to get this to work with a WKInterfaceController or is SwiftUI the only option?
1
1
704
Sep ’21