| Build a Mobile Experience

www.innovationm.com

Support for Applications running in
background in iOS

Corporate Office:...
| Build a Mobile Experience

www.innovationm.com

Support for applications running in background in iOS
When application i...
| Build a Mobile Experience

www.innovationm.com

1.




The app plays audible content to the user while in the backgrou...
| Build a Mobile Experience

www.innovationm.com

3.



The app provides the ability for the user to make phone calls usi...
| Build a Mobile Experience

www.innovationm.com

5.




The app works with a hardware accessory that needs to deliver u...
| Build a Mobile Experience


www.innovationm.com

Application must provide an interface that allows the user to start an...
Upcoming SlideShare
Loading in …5
×

iOS background applications

556 views
419 views

Published on

When application in iOS goes in background (Say, Home button is pressed) then application will not run. In iOS, only specific application types are allowed to run in the background.

http://blogs.innovationm.com/support-for-applications-running-in-background-ios/

Published in: Technology, Education
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
556
On SlideShare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
0
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

iOS background applications

  1. 1. | Build a Mobile Experience www.innovationm.com Support for Applications running in background in iOS Corporate Office: InnovationM Mobile Technologies E-3 (Ground Floor), Sector-3, Noida 201301 (India) t: +91 8447 227337 | e: info@innovationm.com
  2. 2. | Build a Mobile Experience www.innovationm.com Support for applications running in background in iOS When application in iOS goes in background (Say, Home button is pressed) then application will not run. In iOS, only specific application types are allowed to run in the background. Let us see them in more detail. Application Types Support for Background in iOS There are 7 types of such applications. See the details below: Corporate Office: InnovationM Mobile Technologies E-3 (Ground Floor), Sector-3, Noida 201301 (India) t: +91 8447 227337 | e: info@innovationm.com
  3. 3. | Build a Mobile Experience www.innovationm.com 1.   The app plays audible content to the user while in the background. (This content includes streaming audio or video content using AirPlay)  There should be entry for “audio” in application plist file.  Application has to start audio session to execute in background. Scenario - User starts listening to the Audio and then presses the Home button. Application will go in background but audio will still be played. If this application is not specified as Audio type application then audio will stop when the user presses Home button. 2.   The app keeps users informed of their location, even while it is running in the background.  There should be entry for “location” in application plist file.  Application has to register itself for receiving location event. Scenario - Application wants to track the user location and registers for receiving location specifying the distance and accuracy. User presses the Home button and application goes in background and then to Suspended state. When there is a change in the location then OS will wake the application. Application will get the location data and can then process it, say sending this location data to the server. Corporate Office: InnovationM Mobile Technologies E-3 (Ground Floor), Sector-3, Noida 201301 (India) t: +91 8447 227337 | e: info@innovationm.com
  4. 4. | Build a Mobile Experience www.innovationm.com 3.  The app provides the ability for the user to make phone calls using an Internet connection.  There should be entry for “voip” in application plist file.  Application has to implement APNS (Apple Push Notification Service).  Application should include audio for background mode. Scenario – Application makes a socket connection with the server to communicate. When the user presses Home button then application will go in the background state and then to Suspended state. OS then takes over and keeps this Socket connection alive. When server communicates on this connection then OS wakes up the application and hands over the connection to the app. 4.   There should be entry for “newsstand-content” in application plist file.  Application has to implement APNS (Apple Push Notification Service).  Application downloads and processes magazine or newspaper content in the background. Scenario - Application goes in Background. There is some content on the server that has to be notified to the app. Server sends push notification to the app and wakes the app in the background. Now, app can process the notification, say getting the content from the server and storing it locally. Next time, when the user launches the app, will see an updated content. Corporate Office: InnovationM Mobile Technologies E-3 (Ground Floor), Sector-3, Noida 201301 (India) t: +91 8447 227337 | e: info@innovationm.com
  5. 5. | Build a Mobile Experience www.innovationm.com 5.   The app works with a hardware accessory that needs to deliver updates on a regular schedule through the External Accessory framework.  There should be entry for “external-accessory” in application plist file.  Application must provide an interface that allows the user to start and stop the delivery of accessory update events. That interface should then open or close the accessory session as appropriate (such as heart-rate monitors). Scenario - The user launches application which opens an NSStream to the external accessories such as heart monitoring accessory. While running user switches to the application which causes our app to enter into a background state. The application continues to collect the data stream from the accessory. The app works with a hardware accessory that needs to deliver updates on a regular schedule through the External Accessory framework. 6.   The app works with a Bluetooth accessory that needs to deliver updates on a regular schedule through the Core Bluetooth framework.  There should be entry for “bluetooth-central” in application plist file. Corporate Office: InnovationM Mobile Technologies E-3 (Ground Floor), Sector-3, Noida 201301 (India) t: +91 8447 227337 | e: info@innovationm.com
  6. 6. | Build a Mobile Experience  www.innovationm.com Application must provide an interface that allows the user to start and stop the delivery of accessory update events. That interface should then open or close the accessory session as appropriate (such as a Bluetooth heart rate belt). Scenario - This type is for apps implementing the central role. The system wakes it up from a suspended state to allow it to handle Bluetooth related events. While your app is in the background you can still discover and connect to peripherals, and explore and interact with peripheral data. 7.  The app supports Bluetooth communication in peripheral mode through the Core Bluetooth framework.  There should be entry for “bluetooth-peripheral” in application plist file.  Application must provide an interface that allows the user to start and stop the delivery of accessory update events. That interface should then open or close the accessory session as appropriate. Scenario - This type is for apps implementing the peripheral role. The system wakes it up from a suspended state to allow it to handle Bluetooth- related events. The Core Bluetooth framework allows your app to advertise while in the background state. Corporate Office: InnovationM Mobile Technologies E-3 (Ground Floor), Sector-3, Noida 201301 (India) t: +91 8447 227337 | e: info@innovationm.com

×