Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

MacMan988

macrumors 6502a
Original poster
Jul 7, 2012
838
120
Hi, I have heard that Apple has defined a set of app types that can gain continuous background processing capabilities and an app has to fall into one of these categories to perform background long-running background tasks.

For tasks that require more execution time to implement, you must request specific permissions to run them in the background without their being suspended. In iOS, only specific app types are allowed to run in the background:

Apps that play audible content to the user while in the background, such as a music player app
Apps that keep users informed of their location at all times, such as a navigation app
Apps that support Voice over Internet Protocol (VoIP)
Newsstand apps that need to download and process new content
Apps that receive regular updates from external accessories
Apps that implement these services must declare the services they support and use system frameworks to implement the relevant aspects of those services. Declaring the services lets the system know which services you use, but in some cases it is the system frameworks that actually prevent your application from being suspended.

And then I read about this app called "Heard" which records input to microphone continuously while in the background.

http://techcrunch.com/2013/06/23/new-ios-app-lets-you-record-what-you-heard-five-minutes-ago/

How does these certain apps gets the ability to perform in the background even when they are not falling under any of the categories Apple has mentioned?
 

firewood

macrumors G3
Jul 29, 2003
8,113
1,353
Silicon Valley
If you read the documentation fine print, the "audio" background modes key also allows recording as well as playing in the background (in specified circumstances).

A lot of iOS development requires exhaustive reading of the detailed documentation and the SDK headers, not just the summary paragraphs.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.