Is it possible to run any code in the background in iOS if your app has not been opened yet by the user? For instance, user installs app, opens app, logs in, restarts phone. Can any code be executed until they open the app again?
Asked
Active
Viewed 61 times
0
-
1nope, this is impossible, depending on what you want to do, you could use Local or Push notifications, in to " wake up" your app – sken3r.MI Feb 23 '16 at 14:51
-
Hmmm could I schedule a daily local notification to kick off some repeating timers and have some code execute when the timers fire off? – bsantisi Feb 23 '16 at 14:56
-
can this help: http://stackoverflow.com/questions/11303413/iphone-daily-local-notifications – Ebru Güngör Feb 23 '16 at 15:20
-
Also, if you wake the app from using a remote notification, is that temporary until the operating system decides it's been open long enough? Or can you have it running permanently if you listed the proper background processes in the plist? – bsantisi Feb 23 '16 at 15:22
-
Actually, I just realized that this is a non issue for me since what I am trying to do is range for beacons in the background, and when one is detected it will automatically wake the app from being suspended anyway. Thanks for the help though! – bsantisi Feb 23 '16 at 15:31