I have an app in which i download some data periodically (i currently use nstimer). Is it possible to do this periodically in iOS without launching my app?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
No, its not possible. You can’t treat apps like services.
The only way to do this is when the app is up and running.
Some apps may be allowed to execute stuff while they are in background (the user launched it and then pressed the home button, for example), but they have to be set like audio apps, for i.e., in the info.plist you add this:
<key>UIBackgroundModes</key><array><string>audio</string></array>and make sure the audioSession is active (playing a song, for i.e.).
Anyways, I do not recommend the before mentioned method. I’d go the classic way, running the download on a background thread.