Is there any way in latest iOS to initiate location capture at a particular time each day (say morning and evening ), even if the app is in background or not running.
Asked
Active
Viewed 58 times
0
-
What's the purpose of getting the location when the app is not running? – vadian Jan 18 '16 at 09:29
-
You would have to send a notification to wake up the app. – Avi Jan 18 '16 at 10:55
-
@vadian Need to know where the device is currently(it's a tracking tool), so need to know the location if the user kill the application as well – mbasheerk Jan 18 '16 at 11:19
1 Answers
0
You should read Background execution. Background jobs are actually not recommended:
An app might move to the background because the user launched a different app or because the user locked the device and is not using it right now. In both situations, the user is signaling that your app does not need to be doing any meaningful work right now. Continuing to run in such conditions will only drain the device’s battery and might lead the user to force quit your app altogether.
As for getting user location check this answer How can I get current location from user in iOS