0

How can an app be modified to establish a high priority to a backgrounded iOS app that has been given Critical Alert status by Apple. The priority and CPU utilization is not as intense as an audio/video stream; just a database query once every 10 seconds with extremely rare critical alert execution. Is there another request needed to gain permission and implementation procedures from Apple?

Nothing but research.

Marc George
  • 134
  • 1
  • 18
  • There are a limited set of purposes for which continued background execution is permitted. Streaming, VOIP, navigation, etc. Simply performing database query every 10 seconds is not going to pass the app store review process. – Rob Aug 03 '23 at 18:09
  • We can’t advise you further without knowing the broader problem you are trying to solve by querying every 10 seconds. E.g., if based upon location changes, perhaps “significant change” or “region” monitoring. If looking for changes in the backend, shift to a remote push notification pattern. Etc. There are many ways of getting real-time updates to your app without polling every 10 seconds (which is an anti-pattern). – Rob Aug 03 '23 at 18:15
  • See https://stackoverflow.com/a/48449500/1271826 – Rob Aug 03 '23 at 18:30
  • Note that a critical alert that is not subject to architectural problems of push notifications which are imposed by the multiple entities involved and the potential delivery delay problems is the goal. The prototype used push notifications and the issues were consistently present. – Marc George Aug 17 '23 at 01:56
  • I wasn’t worried about the delivery of the critical alert, but rather commenting on the broader idea of repeatedly polling every 10 seconds for a rare event. Apps, with a few aforementioned exceptions, cannot continue to run in the background perpetually. Usually, they are suspended when the user leaves the app. (BTW, when testing this, do not run via Xcode as that artificially changes/extends the app lifecycle.) The OS provides mechanisms to launch the app in the background, but solely at a time of its own discretion. It’s nothing close to every 10 seconds, and certainly not perpetually. – Rob Aug 17 '23 at 17:06
  • A few resources: [Choosing Background Strategies for Your App](https://developer.apple.com/documentation/backgroundtasks/choosing_background_strategies_for_your_app/), WWDC 2019’s [Advances in App Background Execution](https://developer.apple.com/videos/play/wwdc2019/707), or 2020’s [Background execution demystified](https://developer.apple.com/videos/play/wwdc2020/10063). – Rob Aug 17 '23 at 17:09

0 Answers0