Thanks for the pointer, Quinn, but I'm afraid that doesn't answer my question. My app is using the "background audio mode" and successfully running in the background both when the device is unlocked & when it's locked. (I know it's running in the background because I can hear the audio it generates and see new statements in the log)
The problem is, even though my app is running in the background and pushing live activity content updates, iOS stops updating content after the screen is locked and doesn't resume until the user opens the app in the foreground. (Again, the app is running, generating audio, and log statements continually - it's ONLY the live activity that stops updating)
Below is the method I'm using to update the live activity:
fileprivate func updateLiveActivity(liveActivity:ActivityKit.Activity<LiveActivityAttributes>, contentState:LiveActivityAttributes.ContentState){
log.debug("LiveActivityManager.updateLiveActivity() with new ContentState")
Task{
await liveActivity.update( ActivityContent(state:contentState, staleDate:nil) )
}
}
A shown in the log above, I normally see my log.debug message immediately followed by an iOS generated "Updating content for activity " message, but the iOS update message only updates once after the protectedDataWillBecomeUnavailableNotification, so my live activity display is out of date until the user returns my app to the foreground.