Same problem.
Removing "<key>com.apple.developer.healthkit.access</key>
<array/>"
does help with the app but not with the widget!
In the widget-entitlement there is no:
"<key>com.apple.developer.healthkit.access</key>
<array/>"
Post
Replies
Boosts
Views
Activity
Hey, thank you for your detailed help.
I think that's my fail, I have a View-Extension "onFirstAppear" attached to my main-view which is only called once where I do the background-task registration.
It is a SwiftUI App so i have no AppDelegate "didFinishlaunching..." so I thought this is a good place therefor.
Is there a good place to do the registration in a SwiftuiApp?
Do you have a recommendation where to do the registration in a SwiftUI-App?
This is my code:
var body: some Scene {
WindowGroup {
ContentView()
...
`.onFirstAppear {
BGTaskScheduler.shared.register(forTaskWithIdentifier: ID_APPREFRESH, using: nil) { task in
handleAppRefresh(task: task as! BGAppRefreshTask)
}`
Thank you very much!
2023-04-20_10-34-48.7698_+0200-6240cc5ed317e999b76b0a68a2c9e4d8a595afb1.crash
same yesterday and today. App does not appear in the TestFlight app, neither on iOS nor on Mac.
I've tried Xcode and Trasnporter, no one works.