Thank you so much, this helps clarify a lot! It appears as though if screentime is disabled, then Phone is the only "allowable" app; if screentime is enabled, however, it appears that Phone, Messages, FaceTime, and Maps are "allowable" by default. Are you able to confirm this, or does it vary by user / device?
Post
Replies
Boosts
Views
Activity
Thank you for the response.
There is a button in the app that triggers the start of a live activity. I'm not too familiar with how it works (or should work), but this is the code that triggers the activity:
activity = try! Activity<live_activity_name>.request(attributes: attributes, contentState: state, pushType: nil)
Then, when the user clicks the button again, it should end the live activity:
await activity?.end(using: state, dismissalPolicy: .immediate)
The problem is that when the user force quits the app, then reopens the app and triggers the code above to end the live activity, it does not actually end it. The lines of code listed above are within an if-else branch, with the condition being the value of the boolean state (related to whether the live activity should be active or ended).
Based on your response, does this mean that I should fetch all ongoing Live Activities using Activity.activities (instead of relying on the boolean variable within the app)?