@fsousa Hi Fernando! Can you please file Feedback and post the number here? We might have broken something recently. (The error means you can’t start a workout from the background; is that what you’re trying to do, or is it a straightforward Start Workout button tap in the foreground that’s hitting this error in the sim?)
@fsousa Yes, I have a theory; just need to get the feedback to the right folks. Thanks for filing.
@fsousa Yes, I have a theory; just need to get the feedback to the right folks. Thanks for filing.
@lorihc Hey Lori. Is this error related with the watchOS app trying to start a session in background or the session.prepare() being called in a background thread?
@fsousa The former.
@lorihc alright. So it is definitely a bug on the watchOS Simulator because I can assure you that the app is in foreground.
@lorihc Hey Lori. I have updates about this. This bug happens on a project with the watchOS app target and the watchOSApplicationExtension. If I change the project to a single-target model, the bug doesn't happen. We can't upgrade the single-model now since our app is health kit compatible and runs on watchOS 8
@fsousa Thanks for the update, Fernando! I might have a word of caution for you here; will follow up in the Feedback Assistant when I’m back in the office (on a plane right now).
@lorihc Thanks for the reply
@lorihc Yes. I think you have a thread on wwdc22 slack about the new single-target model, and there were a few questions about watchOS 8, HealthKit, and single-target model.
Is it worth testing again the single-target model on the watchOS 8?
@fsousa Yep, my concern is that HK authorizations won’t work as expected. The good news is that your current app setup works on device. I wouldn’t mess with that while the HK team investigates the simulator issue.
@lorihc Agree.
The main problem is that to test the running session without the simulator is very hard. And all the changes that I’m working on are exclusively on watchOS 10 so I can’t even use the watchOS 9 simulator.
If the iOS app asks the HK authorizations, that shouldn’t be a problem on the watchOS app. Should it?
@lorihc Hey Lori. How are you? I just attached on the FB a sample Xcode project where it is possible to reproduce the issue.
@lorihc Thanks for the reply. Here's the feedback FB13159552.
You were my last option since it’s broken only on the watchOS 10 Simulator. It's working on the watchOS 9 Simulator. It works on both devices.