SlideShare ist ein Scribd-Unternehmen logo
1 von 23
Downloaden Sie, um offline zu lesen
Multitasking in iOS 7
Mickaël Rémond <mremond@boxcar.io>

Universal Push Notification Platform
Pre-iOS 7 options for background modes
Previously you had access to the following options:
!

Audio playback
Location update
Task completion (up to 10 minutes)
Newsstand download
Voice-over-IP (VoIP) services
Accessory or CoreBluetooth communication
!

Specific limitations for each of them

Universal Push Notification Platform
Change in background tasks handling (1/3)
Apps will get scheduled when device is active and
not keep it awake
They still get up to 10 minutes run time, not
guaranteed to be continuous
!

WWDC 204

Universal Push Notification Platform
Change in background tasks handling (2/3)
// AppDelegate
UIBackgroundTaskIdentifier background_task;

!

- (void)applicationDidEnterBackground:(UIApplication *)application
{
if([[UIDevice currentDevice] respondsToSelector:@selector(isMultitaskingSupported)])
{
NSLog(@"Multitasking Supported");
if (background_task == UIBackgroundTaskInvalid) {
background_task = [application beginBackgroundTaskWithExpirationHandler:^ {
NSLog(@"Background task expirationn");
//Clean up code. Tell the system that we are done.
[application endBackgroundTask: background_task];
background_task = UIBackgroundTaskInvalid;
}];
//To make the code block asynchronous
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
//### background task starts
NSLog(@"Running in the backgroundn");
while(TRUE)
{
NSLog(@"Background time Remaining: %f",[[UIApplication sharedApplication] backgroundTimeRemaining]);
[NSThread sleepForTimeInterval:1]; //wait for 1 sec
}
//#### background task ends
//Clean up code. Tell the system that we are done.
[application endBackgroundTask: background_task];
background_task = UIBackgroundTaskInvalid;
});
}
else
{
NSLog(@"Multitasking Not Supported");
}
}
}

!

Universal Push Notification Platform
Change in background tasks handling (3/3)
On iOS 6, starts with 10 min:
2013-11-14 08:59:54.165 Background1[149:1103] Background time Remaining: 599.981943

!
!

On iOS 7, starts with 3 min:
2013-11-14 09:02:33.182 Background1[6315:1803] Background time Remaining: 179.942678

!

This is a big change for many apps using
background tasks.
!

I never seem task being scheduled discontinously …
Yet.

Universal Push Notification Platform
iOS 7 new background modes
With iOS 7 you have three new modes:
!

Background fetching
Remote notification
Background transfers
!

All modes keep Apple and users in control to
preserve battery life

Universal Push Notification Platform
Project *info.plist: select background modes
Two new modes available:
!

fetch (App downloads content from the
network)
remote-notification (App download
content in response to push notifications)

Universal Push Notification Platform
Background fetch

Universal Push Notification Platform
Background fetching: close control
!

iOS stays in control: “Application launched
opportunistically”
Coalesced across applications
means scheduled based on usage pattern
sensitive to energy and data usage
!

Users stay in control:
Force close disable background fetch
Dedicated setting panel

Universal Push Notification Platform
Background fetching: user control
Preferences -> General -> Background App Refresh

Universal Push Notification Platform
Background fetching: usage patterns
WWDC 204

Universal Push Notification Platform
Background fetching: App Delegate
New delegate method on UIApplication is called
- (void)application:(UIApplication *)application!
performFetchWithCompletionHandler:(void (^)
(UIBackgroundFetchResult!
result))completionHandler;!

!

Call the completion handler when fetch is complete
to let iOS 7 learn about data availability patterns:
UIBackgroundFetchResultNewData!
UIBackgroundFetchResultNoData!
UIBackgroundFetchResultFailed

Universal Push Notification Platform
Background fetching: Limit server load
At application launch:
!

Define the minimum fetch interval to limit server load:
- (void)setMinimumBackgroundFetchInterval:
(NSTimeInterval)minInterval;!

!

Use constants:
const NSTimeInterval UIApplicationBackgroundFetchIntervalMinimum!
const NSTimeInterval UIApplicationBackgroundFetchIntervalNever!

!

More likely custom values (in seconds)

Universal Push Notification Platform
Background fetching: Tips
Simulate background fetch for testing
Do not forget simulator has an option to
manually trigger background fetch
Limit operation to bare minimum
You have at most 30 seconds of time to
perform download operation
Use NSURLSession to benefit from background
download infrastructure
Track background fetches per user on your server
to discover patterns

Universal Push Notification Platform
Remote notifications

Universal Push Notification Platform
Remote notifs: Dev and Apple control
Developers control:
content-available set to 1 in APNS
payload to tell the application content is
available.
!

Apple stays in control:
Silent notification (without sound / alert /
badge) can be delayed: Battery saving
Normal notifications are send immediately

Universal Push Notification Platform
Remote notifs: App Delegate
New delegate method on UIApplication is called
- (void)application:(UIApplication *)application!
didReceiveRemoteNotification:(NSDictionary
*)userInfo!
fetchCompletionHandler:(void (^)
(UIBackgroundFetchResult result))completionHandler;!

!

Call the completion handler when download is
complete to let iOS 7 learn about data availability
patterns:
UIBackgroundFetchResultNewData!
UIBackgroundFetchResultNoData!
UIBackgroundFetchResultFailed!

Universal Push Notification Platform
Remote notifs: Tips
!

Limit operation to bare minimum
You have at most 30 seconds of time to
perform download operation
!

Use NSURLSession to benefit from background
download infrastructure

Universal Push Notification Platform
Background transfers

Universal Push Notification Platform
Background transfers: Usage
!

Used for data download and upload
!

Used for granting iOS control over background
operation
!

Does not obsolete AFNetworking especially if you
need parsing / serialization
!

Quite a large piece of code with many options:
Take the time to learn them, they are powerful

Universal Push Notification Platform
Background transfers: Nice features
!

Download / upload tasks in background
!

Discretionary setting to save battery
!

Limit download to Wifi only

Universal Push Notification Platform
Background transfers: Tips
!

Take the time to explore all the options / cases. To
implement complex cases, data will flow through
multiple paths in code
!

Not “magic”: You still have to handle network failure
and errors, resume on the next chunk
Do not forget there is a server on the back that
will timeout at some point
!

Take it as a great toolbox to handle advanced cases

Universal Push Notification Platform
References
Talk example code
https://github.com/boxcar/talk-code-examples/tree/
master/background-ios7
!

Background Modes in iOS Tutorial (pre-iOS 7)
http://www.raywenderlich.com/29948/
backgrounding-for-ios
!

WWDC 2013 Session 204: What’s new with
multitasking.

Universal Push Notification Platform

Weitere ähnliche Inhalte

Was ist angesagt?

Travis and fastlane
Travis and fastlaneTravis and fastlane
Travis and fastlaneSteven Shen
 
Lesson 02 - React Native Development Environment Setup
Lesson 02 - React Native Development Environment SetupLesson 02 - React Native Development Environment Setup
Lesson 02 - React Native Development Environment SetupUniversity of Catania
 
Appcelerator Titanium Intro
Appcelerator Titanium IntroAppcelerator Titanium Intro
Appcelerator Titanium IntroNicholas Jansma
 
Ionic2 - the raise of web developer, Riviera DEV le 17/06/2016
Ionic2 - the raise of web developer, Riviera DEV le 17/06/2016Ionic2 - the raise of web developer, Riviera DEV le 17/06/2016
Ionic2 - the raise of web developer, Riviera DEV le 17/06/2016Loïc Knuchel
 
Ionic2, les développeurs web à l'assaut du mobile, BDX I/O le 21/10/2016
Ionic2, les développeurs web à l'assaut du mobile, BDX I/O le 21/10/2016Ionic2, les développeurs web à l'assaut du mobile, BDX I/O le 21/10/2016
Ionic2, les développeurs web à l'assaut du mobile, BDX I/O le 21/10/2016Loïc Knuchel
 
An overview of the Windows Phone 7 platform
An overview of the Windows Phone 7 platformAn overview of the Windows Phone 7 platform
An overview of the Windows Phone 7 platformJonas Follesø
 
HotPush with Ionic 2 and CodePush
HotPush with Ionic 2 and CodePushHotPush with Ionic 2 and CodePush
HotPush with Ionic 2 and CodePushEvan Schultz
 
Universal JS Web Applications with React - Luciano Mammino - Codemotion Rome ...
Universal JS Web Applications with React - Luciano Mammino - Codemotion Rome ...Universal JS Web Applications with React - Luciano Mammino - Codemotion Rome ...
Universal JS Web Applications with React - Luciano Mammino - Codemotion Rome ...Luciano Mammino
 
Introduction to MonoTouch
Introduction to MonoTouchIntroduction to MonoTouch
Introduction to MonoTouchJonas Follesø
 
JavaFX and WidgetFX at SVCodeCamp
JavaFX and WidgetFX at SVCodeCampJavaFX and WidgetFX at SVCodeCamp
JavaFX and WidgetFX at SVCodeCampStephen Chin
 
Sync is hard: building offline-first Android apps from the ground up
Sync is hard: building offline-first Android apps from the ground up	Sync is hard: building offline-first Android apps from the ground up
Sync is hard: building offline-first Android apps from the ground up droidcon Dubai
 
Android App development and test environment, Understaing android app structure
Android App development and test environment, Understaing android app structureAndroid App development and test environment, Understaing android app structure
Android App development and test environment, Understaing android app structureVijay Rastogi
 
UIViewControllerのコーナーケース
UIViewControllerのコーナーケースUIViewControllerのコーナーケース
UIViewControllerのコーナーケースKatsumi Kishikawa
 
[Devoxx Morocco 2015] Apache Cordova In Action
[Devoxx Morocco 2015] Apache Cordova In Action[Devoxx Morocco 2015] Apache Cordova In Action
[Devoxx Morocco 2015] Apache Cordova In ActionHazem Saleh
 
Titanium Appcelerator - Beginners
Titanium Appcelerator - BeginnersTitanium Appcelerator - Beginners
Titanium Appcelerator - BeginnersAmbarish Hazarnis
 
[JMaghreb 2014] Developing JavaScript Mobile Apps Using Apache Cordova
[JMaghreb 2014] Developing JavaScript Mobile Apps Using Apache Cordova[JMaghreb 2014] Developing JavaScript Mobile Apps Using Apache Cordova
[JMaghreb 2014] Developing JavaScript Mobile Apps Using Apache CordovaHazem Saleh
 
Titanium appcelerator best practices
Titanium appcelerator best practicesTitanium appcelerator best practices
Titanium appcelerator best practicesAlessio Ricco
 

Was ist angesagt? (20)

Travis and fastlane
Travis and fastlaneTravis and fastlane
Travis and fastlane
 
Lesson 02 - React Native Development Environment Setup
Lesson 02 - React Native Development Environment SetupLesson 02 - React Native Development Environment Setup
Lesson 02 - React Native Development Environment Setup
 
6 swt programming
6 swt programming6 swt programming
6 swt programming
 
Appcelerator Titanium Intro
Appcelerator Titanium IntroAppcelerator Titanium Intro
Appcelerator Titanium Intro
 
Swt vs swing
Swt vs swingSwt vs swing
Swt vs swing
 
Ionic2 - the raise of web developer, Riviera DEV le 17/06/2016
Ionic2 - the raise of web developer, Riviera DEV le 17/06/2016Ionic2 - the raise of web developer, Riviera DEV le 17/06/2016
Ionic2 - the raise of web developer, Riviera DEV le 17/06/2016
 
Ionic2, les développeurs web à l'assaut du mobile, BDX I/O le 21/10/2016
Ionic2, les développeurs web à l'assaut du mobile, BDX I/O le 21/10/2016Ionic2, les développeurs web à l'assaut du mobile, BDX I/O le 21/10/2016
Ionic2, les développeurs web à l'assaut du mobile, BDX I/O le 21/10/2016
 
An overview of the Windows Phone 7 platform
An overview of the Windows Phone 7 platformAn overview of the Windows Phone 7 platform
An overview of the Windows Phone 7 platform
 
SWT - Technical Deep Dive
SWT - Technical Deep DiveSWT - Technical Deep Dive
SWT - Technical Deep Dive
 
HotPush with Ionic 2 and CodePush
HotPush with Ionic 2 and CodePushHotPush with Ionic 2 and CodePush
HotPush with Ionic 2 and CodePush
 
Universal JS Web Applications with React - Luciano Mammino - Codemotion Rome ...
Universal JS Web Applications with React - Luciano Mammino - Codemotion Rome ...Universal JS Web Applications with React - Luciano Mammino - Codemotion Rome ...
Universal JS Web Applications with React - Luciano Mammino - Codemotion Rome ...
 
Introduction to MonoTouch
Introduction to MonoTouchIntroduction to MonoTouch
Introduction to MonoTouch
 
JavaFX and WidgetFX at SVCodeCamp
JavaFX and WidgetFX at SVCodeCampJavaFX and WidgetFX at SVCodeCamp
JavaFX and WidgetFX at SVCodeCamp
 
Sync is hard: building offline-first Android apps from the ground up
Sync is hard: building offline-first Android apps from the ground up	Sync is hard: building offline-first Android apps from the ground up
Sync is hard: building offline-first Android apps from the ground up
 
Android App development and test environment, Understaing android app structure
Android App development and test environment, Understaing android app structureAndroid App development and test environment, Understaing android app structure
Android App development and test environment, Understaing android app structure
 
UIViewControllerのコーナーケース
UIViewControllerのコーナーケースUIViewControllerのコーナーケース
UIViewControllerのコーナーケース
 
[Devoxx Morocco 2015] Apache Cordova In Action
[Devoxx Morocco 2015] Apache Cordova In Action[Devoxx Morocco 2015] Apache Cordova In Action
[Devoxx Morocco 2015] Apache Cordova In Action
 
Titanium Appcelerator - Beginners
Titanium Appcelerator - BeginnersTitanium Appcelerator - Beginners
Titanium Appcelerator - Beginners
 
[JMaghreb 2014] Developing JavaScript Mobile Apps Using Apache Cordova
[JMaghreb 2014] Developing JavaScript Mobile Apps Using Apache Cordova[JMaghreb 2014] Developing JavaScript Mobile Apps Using Apache Cordova
[JMaghreb 2014] Developing JavaScript Mobile Apps Using Apache Cordova
 
Titanium appcelerator best practices
Titanium appcelerator best practicesTitanium appcelerator best practices
Titanium appcelerator best practices
 

Andere mochten auch

iOS Backgrounding - SLC Cocoaheads
iOS Backgrounding - SLC CocoaheadsiOS Backgrounding - SLC Cocoaheads
iOS Backgrounding - SLC CocoaheadsDave Stevenson
 
WaveOne server and client by ProcessOne
WaveOne server and client by ProcessOneWaveOne server and client by ProcessOne
WaveOne server and client by ProcessOneMickaël Rémond
 
Multi Chat
Multi ChatMulti Chat
Multi ChatSoftTeco
 
2015: L'année d'Elixir, Code, écosystème et communauté
2015: L'année d'Elixir, Code, écosystème et communauté2015: L'année d'Elixir, Code, écosystème et communauté
2015: L'année d'Elixir, Code, écosystème et communautéMickaël Rémond
 
Real time Web Application with XMPP and Wave
Real time Web Application with XMPP and WaveReal time Web Application with XMPP and Wave
Real time Web Application with XMPP and WaveMickaël Rémond
 
Event Driven Architecture Concepts in Web Technologies - Part 2
Event Driven Architecture Concepts in Web Technologies - Part 2Event Driven Architecture Concepts in Web Technologies - Part 2
Event Driven Architecture Concepts in Web Technologies - Part 2Hamidreza Soleimani
 
Nanomsg - Scalable Networking Library
Nanomsg - Scalable Networking LibraryNanomsg - Scalable Networking Library
Nanomsg - Scalable Networking LibraryHamidreza Soleimani
 
Archipel Introduction - ejabberd SF Meetup
Archipel Introduction - ejabberd SF MeetupArchipel Introduction - ejabberd SF Meetup
Archipel Introduction - ejabberd SF MeetupMickaël Rémond
 
ProcessOne Push Platform: XMPP-based Push Solutions
ProcessOne Push Platform: XMPP-based Push SolutionsProcessOne Push Platform: XMPP-based Push Solutions
ProcessOne Push Platform: XMPP-based Push SolutionsMickaël Rémond
 
Real life XMPP Instant Messaging
Real life XMPP Instant MessagingReal life XMPP Instant Messaging
Real life XMPP Instant MessagingMickaël Rémond
 
Nodejs Applications in Production
Nodejs Applications in ProductionNodejs Applications in Production
Nodejs Applications in ProductionHamidreza Soleimani
 
Event Driven Architecture Concepts in Web Technologies - Part 1
Event Driven Architecture Concepts in Web Technologies - Part 1Event Driven Architecture Concepts in Web Technologies - Part 1
Event Driven Architecture Concepts in Web Technologies - Part 1Hamidreza Soleimani
 
A vision for ejabberd - ejabberd SF Meetup
A vision for ejabberd - ejabberd SF MeetupA vision for ejabberd - ejabberd SF Meetup
A vision for ejabberd - ejabberd SF MeetupMickaël Rémond
 
Phoenix Presence: Le service temps réel de Phoenix - Paris.ex #8
Phoenix Presence: Le service temps réel de Phoenix - Paris.ex #8 Phoenix Presence: Le service temps réel de Phoenix - Paris.ex #8
Phoenix Presence: Le service temps réel de Phoenix - Paris.ex #8 Mickaël Rémond
 
The Real Time Web with XMPP
The Real Time Web with XMPPThe Real Time Web with XMPP
The Real Time Web with XMPPJack Moffitt
 

Andere mochten auch (20)

iOS Backgrounding - SLC Cocoaheads
iOS Backgrounding - SLC CocoaheadsiOS Backgrounding - SLC Cocoaheads
iOS Backgrounding - SLC Cocoaheads
 
WaveOne server and client by ProcessOne
WaveOne server and client by ProcessOneWaveOne server and client by ProcessOne
WaveOne server and client by ProcessOne
 
Multi Chat
Multi ChatMulti Chat
Multi Chat
 
Erlang White Label
Erlang White LabelErlang White Label
Erlang White Label
 
2015: L'année d'Elixir, Code, écosystème et communauté
2015: L'année d'Elixir, Code, écosystème et communauté2015: L'année d'Elixir, Code, écosystème et communauté
2015: L'année d'Elixir, Code, écosystème et communauté
 
Real time Web Application with XMPP and Wave
Real time Web Application with XMPP and WaveReal time Web Application with XMPP and Wave
Real time Web Application with XMPP and Wave
 
Event Driven Architecture Concepts in Web Technologies - Part 2
Event Driven Architecture Concepts in Web Technologies - Part 2Event Driven Architecture Concepts in Web Technologies - Part 2
Event Driven Architecture Concepts in Web Technologies - Part 2
 
Create Your Own Language
Create Your Own LanguageCreate Your Own Language
Create Your Own Language
 
Nanomsg - Scalable Networking Library
Nanomsg - Scalable Networking LibraryNanomsg - Scalable Networking Library
Nanomsg - Scalable Networking Library
 
Archipel Introduction - ejabberd SF Meetup
Archipel Introduction - ejabberd SF MeetupArchipel Introduction - ejabberd SF Meetup
Archipel Introduction - ejabberd SF Meetup
 
OneTeam Media Server
OneTeam Media ServerOneTeam Media Server
OneTeam Media Server
 
ProcessOne Push Platform: XMPP-based Push Solutions
ProcessOne Push Platform: XMPP-based Push SolutionsProcessOne Push Platform: XMPP-based Push Solutions
ProcessOne Push Platform: XMPP-based Push Solutions
 
Real life XMPP Instant Messaging
Real life XMPP Instant MessagingReal life XMPP Instant Messaging
Real life XMPP Instant Messaging
 
Nodejs Applications in Production
Nodejs Applications in ProductionNodejs Applications in Production
Nodejs Applications in Production
 
XMPP Academy #1
XMPP Academy #1XMPP Academy #1
XMPP Academy #1
 
Event Driven Architecture Concepts in Web Technologies - Part 1
Event Driven Architecture Concepts in Web Technologies - Part 1Event Driven Architecture Concepts in Web Technologies - Part 1
Event Driven Architecture Concepts in Web Technologies - Part 1
 
Practical Look at Erlang
Practical Look at ErlangPractical Look at Erlang
Practical Look at Erlang
 
A vision for ejabberd - ejabberd SF Meetup
A vision for ejabberd - ejabberd SF MeetupA vision for ejabberd - ejabberd SF Meetup
A vision for ejabberd - ejabberd SF Meetup
 
Phoenix Presence: Le service temps réel de Phoenix - Paris.ex #8
Phoenix Presence: Le service temps réel de Phoenix - Paris.ex #8 Phoenix Presence: Le service temps réel de Phoenix - Paris.ex #8
Phoenix Presence: Le service temps réel de Phoenix - Paris.ex #8
 
The Real Time Web with XMPP
The Real Time Web with XMPPThe Real Time Web with XMPP
The Real Time Web with XMPP
 

Ähnlich wie Multitasking in iOS 7

Using AIR for Mobile Development
Using AIR for Mobile DevelopmentUsing AIR for Mobile Development
Using AIR for Mobile DevelopmentVeronique Brossier
 
22Flutter.pdf
22Flutter.pdf22Flutter.pdf
22Flutter.pdfdbaman
 
Background Fetch - the most powerful API you've never heard of
Background Fetch - the most powerful API you've never heard ofBackground Fetch - the most powerful API you've never heard of
Background Fetch - the most powerful API you've never heard ofmoliver816
 
NCC Group 44Con Workshop: How to assess and secure ios apps
NCC Group 44Con Workshop: How to assess and secure ios appsNCC Group 44Con Workshop: How to assess and secure ios apps
NCC Group 44Con Workshop: How to assess and secure ios appsNCC Group
 
Skinning Android for Embedded Applications
Skinning Android for Embedded ApplicationsSkinning Android for Embedded Applications
Skinning Android for Embedded ApplicationsVIA Embedded
 
iOS4 multitasking development notes
iOS4 multitasking development notesiOS4 multitasking development notes
iOS4 multitasking development notesNico Tranquilli
 
Dori waldman android _course_2
Dori waldman android _course_2Dori waldman android _course_2
Dori waldman android _course_2Dori Waldman
 
I phone app develoment ppt
I phone app develoment   pptI phone app develoment   ppt
I phone app develoment pptsagaroceanic11
 
I phone app develoment ppt
I phone app develoment   pptI phone app develoment   ppt
I phone app develoment pptsagaroceanic11
 
An end-to-end experience of Windows Phone 7 development (Part 1)
An end-to-end experience of Windows Phone 7 development (Part 1)An end-to-end experience of Windows Phone 7 development (Part 1)
An end-to-end experience of Windows Phone 7 development (Part 1)rudigrobler
 
Nikita Tuk: Handling background processes in iOS: problems & solutions
Nikita Tuk: Handling background processes in iOS: problems & solutionsNikita Tuk: Handling background processes in iOS: problems & solutions
Nikita Tuk: Handling background processes in iOS: problems & solutionsmdevtalk
 
Remote Control based Audio-Video Content Filter Application for Philips 2K10 ...
Remote Control based Audio-Video Content Filter Application for Philips 2K10 ...Remote Control based Audio-Video Content Filter Application for Philips 2K10 ...
Remote Control based Audio-Video Content Filter Application for Philips 2K10 ...Editor IJCATR
 
Android studio
Android studioAndroid studio
Android studioAndri Yabu
 
Android Things, from mobile apps to physical world
Android Things, from mobile apps to physical worldAndroid Things, from mobile apps to physical world
Android Things, from mobile apps to physical worldStefano Sanna
 
Android Things, from mobile apps to physical world - Stefano Sanna - Giovanni...
Android Things, from mobile apps to physical world - Stefano Sanna - Giovanni...Android Things, from mobile apps to physical world - Stefano Sanna - Giovanni...
Android Things, from mobile apps to physical world - Stefano Sanna - Giovanni...Codemotion
 
Android Things, from mobile apps to physical world by Giovanni Di Gialluca an...
Android Things, from mobile apps to physical world by Giovanni Di Gialluca an...Android Things, from mobile apps to physical world by Giovanni Di Gialluca an...
Android Things, from mobile apps to physical world by Giovanni Di Gialluca an...Codemotion
 

Ähnlich wie Multitasking in iOS 7 (20)

Using AIR for Mobile Development
Using AIR for Mobile DevelopmentUsing AIR for Mobile Development
Using AIR for Mobile Development
 
22Flutter.pdf
22Flutter.pdf22Flutter.pdf
22Flutter.pdf
 
What's new in p2 (2009)?
What's new in p2 (2009)?What's new in p2 (2009)?
What's new in p2 (2009)?
 
Pocket pc
Pocket pcPocket pc
Pocket pc
 
Background Fetch - the most powerful API you've never heard of
Background Fetch - the most powerful API you've never heard ofBackground Fetch - the most powerful API you've never heard of
Background Fetch - the most powerful API you've never heard of
 
NCC Group 44Con Workshop: How to assess and secure ios apps
NCC Group 44Con Workshop: How to assess and secure ios appsNCC Group 44Con Workshop: How to assess and secure ios apps
NCC Group 44Con Workshop: How to assess and secure ios apps
 
Skinning Android for Embedded Applications
Skinning Android for Embedded ApplicationsSkinning Android for Embedded Applications
Skinning Android for Embedded Applications
 
iOS4 multitasking development notes
iOS4 multitasking development notesiOS4 multitasking development notes
iOS4 multitasking development notes
 
Windows 8 BootCamp
Windows 8 BootCampWindows 8 BootCamp
Windows 8 BootCamp
 
Dori waldman android _course_2
Dori waldman android _course_2Dori waldman android _course_2
Dori waldman android _course_2
 
I phone app develoment ppt
I phone app develoment   pptI phone app develoment   ppt
I phone app develoment ppt
 
I phone app develoment ppt
I phone app develoment   pptI phone app develoment   ppt
I phone app develoment ppt
 
An end-to-end experience of Windows Phone 7 development (Part 1)
An end-to-end experience of Windows Phone 7 development (Part 1)An end-to-end experience of Windows Phone 7 development (Part 1)
An end-to-end experience of Windows Phone 7 development (Part 1)
 
Nikita Tuk: Handling background processes in iOS: problems & solutions
Nikita Tuk: Handling background processes in iOS: problems & solutionsNikita Tuk: Handling background processes in iOS: problems & solutions
Nikita Tuk: Handling background processes in iOS: problems & solutions
 
Remote Control based Audio-Video Content Filter Application for Philips 2K10 ...
Remote Control based Audio-Video Content Filter Application for Philips 2K10 ...Remote Control based Audio-Video Content Filter Application for Philips 2K10 ...
Remote Control based Audio-Video Content Filter Application for Philips 2K10 ...
 
Android studio
Android studioAndroid studio
Android studio
 
Android by Swecha
Android by SwechaAndroid by Swecha
Android by Swecha
 
Android Things, from mobile apps to physical world
Android Things, from mobile apps to physical worldAndroid Things, from mobile apps to physical world
Android Things, from mobile apps to physical world
 
Android Things, from mobile apps to physical world - Stefano Sanna - Giovanni...
Android Things, from mobile apps to physical world - Stefano Sanna - Giovanni...Android Things, from mobile apps to physical world - Stefano Sanna - Giovanni...
Android Things, from mobile apps to physical world - Stefano Sanna - Giovanni...
 
Android Things, from mobile apps to physical world by Giovanni Di Gialluca an...
Android Things, from mobile apps to physical world by Giovanni Di Gialluca an...Android Things, from mobile apps to physical world by Giovanni Di Gialluca an...
Android Things, from mobile apps to physical world by Giovanni Di Gialluca an...
 

Mehr von Mickaël Rémond

Go for Real Time Streaming Architectures - DotGo 2017
Go for Real Time Streaming Architectures - DotGo 2017Go for Real Time Streaming Architectures - DotGo 2017
Go for Real Time Streaming Architectures - DotGo 2017Mickaël Rémond
 
Fighting XMPP abuse and spam with ejabberd - ejabberd Workshop #1
Fighting XMPP abuse and spam with ejabberd - ejabberd Workshop #1Fighting XMPP abuse and spam with ejabberd - ejabberd Workshop #1
Fighting XMPP abuse and spam with ejabberd - ejabberd Workshop #1Mickaël Rémond
 
Managing ejabberd Platforms with Docker - ejabberd Workshop #1
Managing ejabberd Platforms with Docker - ejabberd Workshop #1Managing ejabberd Platforms with Docker - ejabberd Workshop #1
Managing ejabberd Platforms with Docker - ejabberd Workshop #1Mickaël Rémond
 
Messaging temps réel avec Go
Messaging temps réel avec GoMessaging temps réel avec Go
Messaging temps réel avec GoMickaël Rémond
 
Building Scalable Systems: What you can learn from Erlang - DotScale 2016
Building Scalable Systems: What you can learn from Erlang - DotScale 2016Building Scalable Systems: What you can learn from Erlang - DotScale 2016
Building Scalable Systems: What you can learn from Erlang - DotScale 2016Mickaël Rémond
 
Property-based testing of XMPP: generate your tests automatically - ejabberd ...
Property-based testing of XMPP: generate your tests automatically - ejabberd ...Property-based testing of XMPP: generate your tests automatically - ejabberd ...
Property-based testing of XMPP: generate your tests automatically - ejabberd ...Mickaël Rémond
 
IoT Studio #1: Protocols introduction and connected jukebox
IoT Studio #1: Protocols introduction and connected jukeboxIoT Studio #1: Protocols introduction and connected jukebox
IoT Studio #1: Protocols introduction and connected jukeboxMickaël Rémond
 
Deep Dive Into ejabberd Pubsub Implementation
Deep Dive Into ejabberd Pubsub ImplementationDeep Dive Into ejabberd Pubsub Implementation
Deep Dive Into ejabberd Pubsub ImplementationMickaël Rémond
 

Mehr von Mickaël Rémond (11)

Go for Real Time Streaming Architectures - DotGo 2017
Go for Real Time Streaming Architectures - DotGo 2017Go for Real Time Streaming Architectures - DotGo 2017
Go for Real Time Streaming Architectures - DotGo 2017
 
Fighting XMPP abuse and spam with ejabberd - ejabberd Workshop #1
Fighting XMPP abuse and spam with ejabberd - ejabberd Workshop #1Fighting XMPP abuse and spam with ejabberd - ejabberd Workshop #1
Fighting XMPP abuse and spam with ejabberd - ejabberd Workshop #1
 
Managing ejabberd Platforms with Docker - ejabberd Workshop #1
Managing ejabberd Platforms with Docker - ejabberd Workshop #1Managing ejabberd Platforms with Docker - ejabberd Workshop #1
Managing ejabberd Platforms with Docker - ejabberd Workshop #1
 
Messaging temps réel avec Go
Messaging temps réel avec GoMessaging temps réel avec Go
Messaging temps réel avec Go
 
Building Scalable Systems: What you can learn from Erlang - DotScale 2016
Building Scalable Systems: What you can learn from Erlang - DotScale 2016Building Scalable Systems: What you can learn from Erlang - DotScale 2016
Building Scalable Systems: What you can learn from Erlang - DotScale 2016
 
Property-based testing of XMPP: generate your tests automatically - ejabberd ...
Property-based testing of XMPP: generate your tests automatically - ejabberd ...Property-based testing of XMPP: generate your tests automatically - ejabberd ...
Property-based testing of XMPP: generate your tests automatically - ejabberd ...
 
IoT Studio #1: Protocols introduction and connected jukebox
IoT Studio #1: Protocols introduction and connected jukeboxIoT Studio #1: Protocols introduction and connected jukebox
IoT Studio #1: Protocols introduction and connected jukebox
 
Deep Dive Into ejabberd Pubsub Implementation
Deep Dive Into ejabberd Pubsub ImplementationDeep Dive Into ejabberd Pubsub Implementation
Deep Dive Into ejabberd Pubsub Implementation
 
XMPP Academy #3
XMPP Academy #3XMPP Academy #3
XMPP Academy #3
 
XMPP Academy #2
XMPP Academy #2XMPP Academy #2
XMPP Academy #2
 
OneTeam Media Server
OneTeam Media ServerOneTeam Media Server
OneTeam Media Server
 

Kürzlich hochgeladen

A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAndikSusilo4
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 

Kürzlich hochgeladen (20)

A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & Application
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 

Multitasking in iOS 7

  • 1. Multitasking in iOS 7 Mickaël Rémond <mremond@boxcar.io> Universal Push Notification Platform
  • 2. Pre-iOS 7 options for background modes Previously you had access to the following options: ! Audio playback Location update Task completion (up to 10 minutes) Newsstand download Voice-over-IP (VoIP) services Accessory or CoreBluetooth communication ! Specific limitations for each of them Universal Push Notification Platform
  • 3. Change in background tasks handling (1/3) Apps will get scheduled when device is active and not keep it awake They still get up to 10 minutes run time, not guaranteed to be continuous ! WWDC 204 Universal Push Notification Platform
  • 4. Change in background tasks handling (2/3) // AppDelegate UIBackgroundTaskIdentifier background_task; ! - (void)applicationDidEnterBackground:(UIApplication *)application { if([[UIDevice currentDevice] respondsToSelector:@selector(isMultitaskingSupported)]) { NSLog(@"Multitasking Supported"); if (background_task == UIBackgroundTaskInvalid) { background_task = [application beginBackgroundTaskWithExpirationHandler:^ { NSLog(@"Background task expirationn"); //Clean up code. Tell the system that we are done. [application endBackgroundTask: background_task]; background_task = UIBackgroundTaskInvalid; }]; //To make the code block asynchronous dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ //### background task starts NSLog(@"Running in the backgroundn"); while(TRUE) { NSLog(@"Background time Remaining: %f",[[UIApplication sharedApplication] backgroundTimeRemaining]); [NSThread sleepForTimeInterval:1]; //wait for 1 sec } //#### background task ends //Clean up code. Tell the system that we are done. [application endBackgroundTask: background_task]; background_task = UIBackgroundTaskInvalid; }); } else { NSLog(@"Multitasking Not Supported"); } } } ! Universal Push Notification Platform
  • 5. Change in background tasks handling (3/3) On iOS 6, starts with 10 min: 2013-11-14 08:59:54.165 Background1[149:1103] Background time Remaining: 599.981943 ! ! On iOS 7, starts with 3 min: 2013-11-14 09:02:33.182 Background1[6315:1803] Background time Remaining: 179.942678 ! This is a big change for many apps using background tasks. ! I never seem task being scheduled discontinously … Yet. Universal Push Notification Platform
  • 6. iOS 7 new background modes With iOS 7 you have three new modes: ! Background fetching Remote notification Background transfers ! All modes keep Apple and users in control to preserve battery life Universal Push Notification Platform
  • 7. Project *info.plist: select background modes Two new modes available: ! fetch (App downloads content from the network) remote-notification (App download content in response to push notifications) Universal Push Notification Platform
  • 8. Background fetch Universal Push Notification Platform
  • 9. Background fetching: close control ! iOS stays in control: “Application launched opportunistically” Coalesced across applications means scheduled based on usage pattern sensitive to energy and data usage ! Users stay in control: Force close disable background fetch Dedicated setting panel Universal Push Notification Platform
  • 10. Background fetching: user control Preferences -> General -> Background App Refresh Universal Push Notification Platform
  • 11. Background fetching: usage patterns WWDC 204 Universal Push Notification Platform
  • 12. Background fetching: App Delegate New delegate method on UIApplication is called - (void)application:(UIApplication *)application! performFetchWithCompletionHandler:(void (^) (UIBackgroundFetchResult! result))completionHandler;! ! Call the completion handler when fetch is complete to let iOS 7 learn about data availability patterns: UIBackgroundFetchResultNewData! UIBackgroundFetchResultNoData! UIBackgroundFetchResultFailed Universal Push Notification Platform
  • 13. Background fetching: Limit server load At application launch: ! Define the minimum fetch interval to limit server load: - (void)setMinimumBackgroundFetchInterval: (NSTimeInterval)minInterval;! ! Use constants: const NSTimeInterval UIApplicationBackgroundFetchIntervalMinimum! const NSTimeInterval UIApplicationBackgroundFetchIntervalNever! ! More likely custom values (in seconds) Universal Push Notification Platform
  • 14. Background fetching: Tips Simulate background fetch for testing Do not forget simulator has an option to manually trigger background fetch Limit operation to bare minimum You have at most 30 seconds of time to perform download operation Use NSURLSession to benefit from background download infrastructure Track background fetches per user on your server to discover patterns Universal Push Notification Platform
  • 15. Remote notifications Universal Push Notification Platform
  • 16. Remote notifs: Dev and Apple control Developers control: content-available set to 1 in APNS payload to tell the application content is available. ! Apple stays in control: Silent notification (without sound / alert / badge) can be delayed: Battery saving Normal notifications are send immediately Universal Push Notification Platform
  • 17. Remote notifs: App Delegate New delegate method on UIApplication is called - (void)application:(UIApplication *)application! didReceiveRemoteNotification:(NSDictionary *)userInfo! fetchCompletionHandler:(void (^) (UIBackgroundFetchResult result))completionHandler;! ! Call the completion handler when download is complete to let iOS 7 learn about data availability patterns: UIBackgroundFetchResultNewData! UIBackgroundFetchResultNoData! UIBackgroundFetchResultFailed! Universal Push Notification Platform
  • 18. Remote notifs: Tips ! Limit operation to bare minimum You have at most 30 seconds of time to perform download operation ! Use NSURLSession to benefit from background download infrastructure Universal Push Notification Platform
  • 19. Background transfers Universal Push Notification Platform
  • 20. Background transfers: Usage ! Used for data download and upload ! Used for granting iOS control over background operation ! Does not obsolete AFNetworking especially if you need parsing / serialization ! Quite a large piece of code with many options: Take the time to learn them, they are powerful Universal Push Notification Platform
  • 21. Background transfers: Nice features ! Download / upload tasks in background ! Discretionary setting to save battery ! Limit download to Wifi only Universal Push Notification Platform
  • 22. Background transfers: Tips ! Take the time to explore all the options / cases. To implement complex cases, data will flow through multiple paths in code ! Not “magic”: You still have to handle network failure and errors, resume on the next chunk Do not forget there is a server on the back that will timeout at some point ! Take it as a great toolbox to handle advanced cases Universal Push Notification Platform
  • 23. References Talk example code https://github.com/boxcar/talk-code-examples/tree/ master/background-ios7 ! Background Modes in iOS Tutorial (pre-iOS 7) http://www.raywenderlich.com/29948/ backgrounding-for-ios ! WWDC 2013 Session 204: What’s new with multitasking. Universal Push Notification Platform