I am super excited to see my latest article published on MobiForge. Here is the abstract:
Apple takes a measured approach to background processing. In the early days of the iPhone, after complains from developers about the inability to run apps in the background, Apple introduced the Apple Push Notification service (APNS). APNs allows apps which are not already running to receive background push notifications, thereby allowing apps to be notified when some important events need their attention.
In iOS 7, Apple has introduced another feature to allow apps to run (more or less) in the background – Background Fetch. Background Fetch allows your app to continuously fetch data from the network when it is in the background. As an example, consider the Facebook app. When the Facebook app is in the background, it can continually fetch the latest news feed so that when the user switches the app to the foreground, the latest news feed is already ready for viewing.
In this article we'll take a look to see how background fetch can be used to connect to a Web service, the Open Weather Map API, so that your app can continue to update itself in the background."