Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

leescottdavis

macrumors member
Jan 25, 2021
92
86
When completing a workout, why does it take so long to save? Apple Workouts is instant, but YR sometimes takes a minute or two and I get nervous I am going to lose my workout.
 

rbart

macrumors 65816
Original poster
Nov 3, 2013
1,324
1,076
France
It's also a mystery for me ...
I use the normal API to save data at the end of the workout.
My guess:
- Apple stores less GPS points for the same workout
- Apple has some private APIs that perform incremental saves during the workout
I am also doing some "backup" tasks in case of HealthKit failure. Apple doesn't do that, but it doesn't cost a lot.
If you do interval training, the new way to do it internally is to divide the workout into separate activities, and it's way longer to save at the end. I have seen that another workout app developer has raised the same issue on Stackoverflow.

I have a question for people who have installed the last release: are the Watch complications working ?
 
  • Like
Reactions: cflem

leescottdavis

macrumors member
Jan 25, 2021
92
86
It's also a mystery for me ...
I use the normal API to save data at the end of the workout.
My guess:
- Apple stores less GPS points for the same workout
- Apple has some private APIs that perform incremental saves during the workout
I am also doing some "backup" tasks in case of HealthKit failure. Apple doesn't do that, but it doesn't cost a lot.
If you do interval training, the new way to do it internally is to divide the workout into separate activities, and it's way longer to save at the end. I have seen that another workout app developer has raised the same issue on Stackoverflow.

I have a question for people who have installed the last release: are the Watch complications working ?
The 'this week' and 'this month' complications both show this week.
 
  • Like
Reactions: rbart

quarq

macrumors member
Oct 14, 2011
67
42
It's also a mystery for me ...
I use the normal API to save data at the end of the workout.
My guess:
- Apple stores less GPS points for the same workout
- Apple has some private APIs that perform incremental saves during the workout
I am also doing some "backup" tasks in case of HealthKit failure. Apple doesn't do that, but it doesn't cost a lot.
If you do interval training, the new way to do it internally is to divide the workout into separate activities, and it's way longer to save at the end. I have seen that another workout app developer has raised the same issue on Stackoverflow.

I have a question for people who have installed the last release: are the Watch complications working ?


I have an app in the App Store that acts like a bike computer.. It got Sherlocked with the last iOS release.. Anyhow, this is on iPhone.. But, using CoreData, if you record a record say each second, there is no lag or wait time at the end.

I was also for a while recording using CloudKit, which records to iCloud live in realtime.. But that absolutely crushes battery on an iPhone. I opened a ticket with Apple and they told me that's expected.. I was better off storing to CloudKit at the end only.

My suggestion then would be to use CoreData and store a record each second. I had a Timer running and every second, whatever was in the buffer got recorded. Zero wait time at the end of the ride and I didn't notice any change in battery performance.
 

leescottdavis

macrumors member
Jan 25, 2021
92
86
Another minor observation regarding voice alerts. I think this is just a translation issue, but when using intervals, the voiceovers at the start of an internal are not quite right.

Example

'Recovery during 500 meters' should be 'Recover for 500 meters'
'Work during 500 meters' should be 'Work for 500 meters'

Notice recover instead of recovery and for instead of during. Hope this helps.
 

rbart

macrumors 65816
Original poster
Nov 3, 2013
1,324
1,076
France
Another minor observation regarding voice alerts. I think this is just a translation issue, but when using intervals, the voiceovers at the start of an internal are not quite right.

Example

'Recovery during 500 meters' should be 'Recover for 500 meters'
'Work during 500 meters' should be 'Work for 500 meters'

Notice recover instead of recovery and for instead of during. Hope this helps.
Thanks for the suggestion, as English is not my native language, there are probably a lot fo similar mistakes.
I will fix that in the next release.
 
  • Like
Reactions: leescottdavis

rbart

macrumors 65816
Original poster
Nov 3, 2013
1,324
1,076
France
I have an app in the App Store that acts like a bike computer.. It got Sherlocked with the last iOS release.. Anyhow, this is on iPhone.. But, using CoreData, if you record a record say each second, there is no lag or wait time at the end.

I was also for a while recording using CloudKit, which records to iCloud live in realtime.. But that absolutely crushes battery on an iPhone. I opened a ticket with Apple and they told me that's expected.. I was better off storing to CloudKit at the end only.

My suggestion then would be to use CoreData and store a record each second. I had a Timer running and every second, whatever was in the buffer got recorded. Zero wait time at the end of the ride and I didn't notice any change in battery performance.
I use Coredata as backup while running. It's super fast, the issue is not there.
To record the workout, I use HealthKit API.
With this API, you don't have the choice, you record workout samples while running (distance, heartrate ...), you also add the GPS positions with a routebuilder. This part is smooth.
At the end, I need to finish the workout to save it to HealthKit.
It's fast, except when I call the method to finish the route (GPS positions): it takes a while, but I can't change that as it's just a call to an Apple method...
And now the Activity split of the workouts is also taking longer when you have a lot of segments ...
 

quarq

macrumors member
Oct 14, 2011
67
42
Ah, interesting. I hadn't put the code in yet to support HealthKit. I didn't realize that was where the slowdown is. Have you thought of opening a ticket with Apple on this ? Might be interesting to see if there is another way to do this to speed it up.
 

rbart

macrumors 65816
Original poster
Nov 3, 2013
1,324
1,076
France
I put a lot of FB, but I rarely get a response.
HealthKit has a reputation of slowness, but it's the only way to create workouts that integrate well in Apple ecosystem.

One remark, YouRace tells the workout is recorded when it's actually fully recorded.
I am not sure Apple workout stock app does the same. It probably finishes in the background.
I could do that, but I think it's better for confidence to say it's saved when it's actually saved.
 
Last edited:

rbart

macrumors 65816
Original poster
Nov 3, 2013
1,324
1,076
France
Version 4.2.1 is available on the AppStore with improved cadence tracking and bug fixes.
 

quarq

macrumors member
Oct 14, 2011
67
42
What is cadence tracking ?

Getting back to the time it takes to update HealthKit, I wonder if maybe Apple isn't doing this in the cloud.. They just upload the raw data and it doesn't get calculated until later. Which might explain why sometimes you finish a run and it doesn't appear on other devices until later..
 

rbart

macrumors 65816
Original poster
Nov 3, 2013
1,324
1,076
France
Cadence is the number of steps per minute.
Useful for some runners...
Apple avoids to put health data in the cloud, to ensure a better confidentiality.
I can understand ...
 

quarq

macrumors member
Oct 14, 2011
67
42
But it's definitely in the cloud. If it wasn't, I wouldn't be able to see my workout on my iPhone..
The other thing that's possible is that they run this in the background..
 

rbart

macrumors 65816
Original poster
Nov 3, 2013
1,324
1,076
France
You can see the values when setting up a target:
Capture d’écran . 2024-04-01 à 12.59.25.png
 

quarq

macrumors member
Oct 14, 2011
67
42
I should have been more precise. In screen configuration for the watch, there is an option to choose "Heart Zones" which has blocks per zone.. How are heart zones mapped to actual heart rate ?
 

rbart

macrumors 65816
Original poster
Nov 3, 2013
1,324
1,076
France
It's not customizable (except max heart rate).
Zones are set according the most common definition:
training-zones.png
 

rbart

macrumors 65816
Original poster
Nov 3, 2013
1,324
1,076
France
You can always ask. But I am authorized to decide 😉
As always, I want to keep a good balance between no setting and too much settings !
Every runner has specific needs, and it’s hard to satisfy everyone without bloating the app, bringing more complexity, more bugs, more tests …
 

quarq

macrumors member
Oct 14, 2011
67
42
Understood. ;-)

Speaking of bugs, two mornings in a row, I have opened your app on my AWU and Intervals is not enabled on the watch. It is in my phone. I can create intervals. But when I open the watch, the option is not there. I deleted the app on my watch and reinstalled it yesterday and it was fine. This morning, same thing. I haven't removed it in case you wanted to debug it.

The option to buy on my watch is there and I can buy it.. So somehow the watch is out of sync with the phone ? Not sure how you are detecting if I have a paid for the Pro version or not. Let me know if you need anything to help diagnose.
 

rbart

macrumors 65816
Original poster
Nov 3, 2013
1,324
1,076
France
If Intervals menu is not showing, it's probably because the watch has "lost" the in-app purchase activation.
In this case, you should have a "Purchases" menu at the bottom of the main menu.
You can reactivate the purchase by "buying" the app again on the watch. Don't be afraid it's free.
It will sync again your in-app purchases from App Store
 

quarq

macrumors member
Oct 14, 2011
67
42
Very odd. When I look at my purchase history inside Settings on my phone, I do not see YouRace. But I remember buying it.. But I also remember buying it when I was running a version from TestFlight. Anyhow, I bought it "again" and still no "Plan" option in the menu and the buy option is gone. So I deleted the app from my watch and reinstalled and all is good.

But, then I went into the app again and started to configure screens etc.. And now "Plan" is no longer there. And the buy option is not there either..
 

quarq

macrumors member
Oct 14, 2011
67
42
Trail is also part of Pro yes ? Trail appears in my menu items.. but Plan does not.

I deleted everything from phone and watch.. No change. Very odd.
 

rbart

macrumors 65816
Original poster
Nov 3, 2013
1,324
1,076
France
Trail mode is part of Pro version
I don’t have the code in front of me, I will check later and give you some update.

Edit:
Could you check if « advanced screen » is ON in settings of the watch app.
If it’s off, you won’t see race and plans as these activities require the second screen to be useful.
 

quarq

macrumors member
Oct 14, 2011
67
42
Edit:
Could you check if « advanced screen » is ON in settings of the watch app.
If it’s off, you won’t see race and plans as these activities require the second screen to be useful.
That was it !

Merci
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.