Background Task Identifier

To start a task that can complete running in the background, a background task identifier needs to be obtained from the application. The background task identifier helps the application keep track of which tasks are running and which are complete. The background task identifier is needed to tell the application that a task is complete and background processing is no longer required. The performBackgroundTask method in ICFViewController obtains the background task identifier before beginning the work to be done in the background.

__block UIBackgroundTaskIdentifier bTask =[[UIApplication sharedApplication]beginBackgroundTaskWithExpirationHandler:^{    ...}];

When obtaining a background task, ...

Get iOS Components and Frameworks: Understanding the Advanced Features of the iOS SDK now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.