Multitasking (iOS): Difference between revisions

Content deleted Content added
Kenanwang (talk | contribs)
Features: Added details on apis
Tags: nowiki added Visual edit
Line 4:
[[Computer multitasking|Multitasking]] for iOS was first released in June 2010 along with the release of [[iOS 4.0]].<ref name=HuffPost1>{{cite web|title=iOS 4 iPhone Update RELEASED: A Guide To iOS 4|url=http://www.huffingtonpost.com/2010/06/21/ios-4-iphone-update-relea_n_619343.html|publisher=[[The Huffington Post]]|accessdate=April 13, 2013|date=June 21, 2010}}</ref><ref name=PCMag1>{{cite web|last=Albanesius|first=Chloe|title=Apple iPhone iOS 4 Software Update Expected Monday|url=http://www.pcmag.com/article2/0,2817,2365351,00.asp|publisher=[[PC Mag]]|accessdate=April 14, 2013|date=June 21, 2010}}</ref> Only certain devices—[[iPhone 4]], [[iPhone 3GS]], and [[iPod Touch]] 3rd generation—were able to use multitasking.<ref name=ArsTechnica1>{{cite web|last=Cheng|first=Jacqui|title=Ars reviews iOS 4: what’s new, notable, and what needs work|url=http://arstechnica.com/apple/2010/06/ars-reviews-ios-4-whats-new-and-notable/|publisher=[[Ars Technica]]|accessdate=April 14, 2013|date=June 21, 2010}}</ref> The [[iPad]] did not get multitasking until the release of [[iOS 4.2]] in November 2010.<ref name=TheRegister1>{{cite web|last=Ray|first=Bill|title=iOS 4.2 multi-tasking comes to the iPad|url=http://www.wired.com/gadgetlab/2010/09/ipad-ios42/|publisher=[[The Register]]|accessdate=April 14, 2013|date=November 22, 2010}}</ref> Currently, multitasking is supported on iPhone 3GS or newer, iPod Touch 3rd generation or newer, and all iPad models.<ref name=Apple1>http://support.apple.com/kb/ht4211</ref>
 
Implementation of multitasking in iOS has been criticized for its approach, that limits the work that applications in the background can perform to a limited function set, and for requiring application developers to add explicit support for it.<ref name="ArsTechnica1" /><ref name="PCWorld2">{{cite web|last=Newman|first=Jared|title=Multitasking With iOS 4 is Horrible: Apple Blew It|url=http://www.pcworld.com/article/199528/Multitasking_With_iOS_4_is_Horrible_Apple_Blew_It.html|publisher=[[PCWorld]]|accessdate=April 14, 2013|date=June 22, 2010}}</ref>
==Features==
===Running in the background===
Before iOS 4, multitasking was limited to a selection of the applications Apple included on the device. Users could, however "jailbreak" their device in order to unofficially
[[File:IOS_Multitasking_Bar.png|right|thumb|
[[File:iOS Multitasking Bar.png|right|The multitasking bar on iOS 4|thumb]]
<nowiki> </nowiki>multitask. Starting with iOS 4, on third-generation and newer iOS devices, multitasking is supported through seven background APIs:
# Background audio – application continues to run in the background as long as it is playing audio or video content
# Voice over IP – application is suspended when a phone call is not in progress
# Background ___location – application is notified of ___location changes
# Push notificationsLocal notifications – application schedules local notifications to be delivered at a predetermined time
# Task completion – application asks the system for extra time to complete a given task
# Fast app switching – application does not execute any code and may be removed from memory at any time
In iOS 5, three new background APIs were introduced:
# Newsstand – application can download content in the background to be ready for the user
# External Accessory – application communicates with an external accessory and shares data at regular intervals
# Bluetooth Accessory – application communicates with a bluetooth accessory and shares data at regular intervals
In iOS 7, Apple introduced a new multitasking feature, providing all apps with the ability to perform background updates. This feature prefers to update the user's most frequently used apps and prefers to use WiFi networks over a cellular network, without markedly reducing the device's battery life.
 
===Fast app switching===
Fast app switching allows apps to pause and resume themselves quickly and easily change to other apps.<ref name="AnandTech1">{{cite web|last=Shimpi|first=Anand|title=Apple's iOS 4 Explored|url=http://www.anandtech.com/show/3779/apples-ios-4-explored/2|publisher=[[AnandTech]]|accessdate=April 14, 2013|date=June 22, 2010}}</ref>An app that is on the screen is considered "running", while an app that is not on screen but is still in memory is considered "suspended".<ref name="PCWorld1">{{cite web|last=Perenson|first=Melissa|title=Multitasking on Apple's iPhone 4: How Does It Work?|url=http://www.pcworld.com/article/198296/iphone_4_multitasking.html|publisher=[[PCWorld]]|accessdate=April 14, 2013|date=June 8, 2010}}</ref> All apps that are built with iOS 4 SDK support fast app switching if running on iOS 4 and a compatible device.<ref name="AppleDev1">https://developer.apple.com/library/ios/#releasenotes/General/WhatsNewIniOS/Articles/iPhoneOS4.html#//apple_ref/doc/uid/TP40009559-SW1</ref> Users can utilize fast app switching by activating the multitasking bar, which can be displayed by double-tapping the home button.<ref name="PCWorld1" /><ref name="ArsTechnica1" />
[[File:iOS Multitasking Bar.png|right|The multitasking bar on iOS 4|thumb]]
Fast app switching allows apps to pause and resume themselves quickly and easily change to other apps.<ref name=AnandTech1>{{cite web|last=Shimpi|first=Anand|title=Apple's iOS 4 Explored|url=http://www.anandtech.com/show/3779/apples-ios-4-explored/2|publisher=[[AnandTech]]|accessdate=April 14, 2013|date=June 22, 2010}}</ref>An app that is on the screen is considered "running", while an app that is not on screen but is still in memory is considered "suspended".<ref name=PCWorld1>{{cite web|last=Perenson|first=Melissa|title=Multitasking on Apple's iPhone 4: How Does It Work?|url=http://www.pcworld.com/article/198296/iphone_4_multitasking.html|publisher=[[PCWorld]]|accessdate=April 14, 2013|date=June 8, 2010}}</ref> All apps that are built with iOS 4 SDK support fast app switching if running on iOS 4 and a compatible device.<ref name=AppleDev1>https://developer.apple.com/library/ios/#releasenotes/General/WhatsNewIniOS/Articles/iPhoneOS4.html#//apple_ref/doc/uid/TP40009559-SW1</ref> Users can utilize fast app switching by activating the multitasking bar, which can be displayed by double-tapping the home button.<ref name=PCWorld1 /><ref name=ArsTechnica1 />
===Task completion===
Task completion allows apps to continue a certain task after the app has been suspended.<ref name=MacWorld1>{{cite web|last=Snell|first=Jason|title=Inside iPhone 4.0's multitasking|url=http://www.macworld.com/article/1150496/multitasking_iphone.html|publisher=[[MacWorld]]|accessdate=April 14, 2013|date=April 8, 2010}}</ref><ref name=CNet1>{{cite web|title=Apple iPhone 4|url=http://reviews.cnet.com/iphone-4-review|publisher=[[CNet]]|accessdate=April 14, 2013|date=June 23, 2010}}</ref> As of iOS 4.0, apps can request up to ten minutes to complete a task in the background.<ref name=iLounge1>{{cite web|last=Hollington|first=Jesse|title=Instant Expert: Secrets & Features of iOS 4|url=http://www.ilounge.com/index.php/articles/comments/instant-expert-secrets-features-of-ios-4/|publisher=[[iLounge]]|accessdate=April 14, 2013|date=June 21, 2010}}</ref>
 
===RunningTask in the backgroundcompletion===
AppsTask oncompletion iOSallows 4.0apps orto latercontinue cana runcertain intask the background by usingafter the followingapp threehas [[API]]s:been suspended.<ref name=PCWorld2"MacWorld1">{{cite web|last=NewmanSnell|first=JaredJason|title=MultitaskingInside With iOSiPhone 4.0's is Horrible: Apple Blew Itmultitasking|url=http://www.pcworldmacworld.com/article/1995281150496/Multitasking_With_iOS_4_is_Horrible_Apple_Blew_Itmultitasking_iphone.html|publisher=[[PCWorldMacWorld]]|accessdate=April 14, 2013|date=April 8, 2010}}</ref><ref name="CNet1">{{cite web|title=Apple iPhone 4|url=http://reviews.cnet.com/iphone-4-review|publisher=[[CNet]]|accessdate=April 14, 2013|date=June 2223, 2010}}</ref> As of iOS 4.0, apps can request up to ten minutes to complete a task in the background.<ref name=Gizmodo1"iLounge1">{{cite web|last=DiazHollington|first=JesusJesse|title=HowInstant MultitaskingExpert: WorksSecrets in& theFeatures Newof iPhone OSiOS 4.0|url=http://gizmodowww.ilounge.com/5512656index.php/howarticles/comments/instant-multitaskingexpert-workssecrets-infeatures-theof-new-iphoneios-os-404/|publisher=[[GizmodoiLounge]]|accessdate=April 14, 2013|date=AprilJune 821, 2010}}</ref>
* Audio—plays audio
* Location—uses ___location services
* VOIP—makes [[VOIP]] calls
In [[iOS 5.0]] or later, there are an additional two APIs that can be used:<ref name=MacWorld2>{{cite web|last=Speirs|first=Fraser|title=How iOS multitasking really works|url=http://www.macworld.com/article/1164616/how_ios_multitasking_really_works.html|publisher=[[MacWorld]]|accessdate=April 14, 2013|date=January 4, 2012}}</ref>
* Newsstand—downloads content for [[Newsstand (application)|Newsstand]]
* External accessory—interacts with an external accessory
 
==See also==