@lorihc hey 👋 I’m struggling with an error on watchOS 10 simulator and HealthKit and didn’t find anything on the Apple docs.
I’m receiving a `errorbackgroundworkoutsessionnotallowed` when I try a `session.prepare()`. It’s only happens on simulator and works fine on device
I don’t have any context on the docs https://developer.apple.com/documentation/healthkit/hkerror/code/errorbackgroundworkoutsessionnotallowed
@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?)
@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 Hey Lori. How are you? I just attached on the FB a sample Xcode project where it is possible to reproduce the 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?