i os meetup_1019

14
Jim Borden Jim Borden What's New with Multitasking?

Upload: jim-borden

Post on 13-Jul-2015

85 views

Category:

Technology


2 download

TRANSCRIPT

Jim BordenJim Borden

What's New with Multitasking?

Changes from iOS 6.x

Changes from iOS 6.x

● New app switcher behavior– Swipe up to remove

apps

– Killing an app also prevents background activity

– App snapshots are live!

Changes from iOS 6.x

● Background Mode Settings– User chooses how the app

can run in the background

New APIs in iOS 7.0

●Background Fetch●Remote Notifications●Background Transfer Service

Background Fetch

● UIBackgroundModes → fetch

● [app setMinimumBackgroundFetchInterval:]

Remote Notifications

Remote Notifications

● Receive message in background– Don't need to inform user at all

● Content ready before user sees notification● Rate limited

– Too many at a time = server queue

– Device decides when is best to receive

Remote Notifications

● UIBackgroundModes → remote-notification

● content-available: 1 in APS payload

Background Transfer Service

Background Transfer Service

● Managed by iOS– Survive application kills and system restarts

● Discretionary transfer type– Power-managed and limited to wi-fi

– All background initiated transfers

– Foreground initiated transfers optional

Things to Note

● Time-limited (< 1 minute vs 10 minutes)● Processed in parallel with other apps

– CPU usage profiling very important

● Complete as soon as possible– Device has to stay awake for your app

● Snapshot is taken after this process– Hide sensitive information

Things to Note

● Minimize hardware usage for battery's sake– Avoid CoreMotion, CoreLocation, etc

– Bring radios down as quickly as possible● Parallelize transfers

Fin