How do I keep my application running in the background? Would I have to jailbreak my iPhone to do this? I just need this app to check something from the internet every set interval and notify when needed, for my own use.
In iOS, only specific app types are allowed to run in the background: Apps that play audible content to the user while in the background, such as a music player app. Apps that record audio content while in the background. Apps that keep users informed of their location at all times, such as a navigation app.
On iOS 6, apps could get 10 minutes of background running time using this technique, but Apple quietly reduced this to three minutes starting with iOS 7. It is quite possible the maximum running time could be reduced in a future operating system update.
Yes, no need to jailbreak. Check out the "Implementing long-running background tasks" section of this doc from Apple.
From Apple's doc: Declaring Your App’s Supported Background Tasks
Support for some types of background execution must be declared in advance by the app that uses them. An app declares support for a service using its Info.plist file. Add the UIBackgroundModes key to your Info.plist file and set its value to an array containing one or more of the following strings: (see Apple's doc from link mentioned above.)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With