New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Will I get current location even if the app is killed or terminated ? #86
Comments
@KrLikeblue You can monitor for significant location changes using
|
Does this mean that even if I have subscribed to continuous updates using subscribeToLocationUpdatesWithBlock my app will not get notified if application terminates. To get notified after the app has been terminated, I need to subscribe using subscribeToSignificantLocationChangesWithBlock also and when didFinishLaunchingWithOptions is called with UIApplicationLaunchOptionsLocationKey, I need to subscribe again with subscribeToSignificantLocationChangesWithBlock and subscribeToLocationUpdatesWithBlock. Can you please confirm ? |
@bishtpradeep Correct. If your app is terminated, you can only get location updates using significant location changes (every ~500m or so). |
Thank you for such a quick response. I was not sure about the re-subscription at launch-after-termination. The README says: Note that when the app terminates, all of your active location requests & subscriptions with INTULocationManager are canceled. Therefore, when the app launches due to a significant location change, you should immediately use INTULocationManager to set up a new subscription for significant location changes in order to receive the location information. and then in example it re-subscribes.
|
@bishtpradeep Apologies; it's been a while. If that's the case in the readme, then I would go that approach (re-subscribe). |
okay. Thanks again. |
Hi, @iwasrobbed thanks for the awesome lib . But in iOS11 ,maybe it is not working. In iOS 11 startMonitoringSignificantLocationChanges working fine in background but not working if killed the app. I am using NSLocationAlwaysAndWhenInUseUsageDescription and NSLocationWhenInUseUsageDescription both key i added in plist. Always authorization i am getting. Even in background its working fine. but if kill the app, location update is not working. What i have to do fix this issue? Please help on this. |
@mrshyi I haven't used this library in a couple of years now (and I'm not the maintainer). To be completely honest, you're probably better off just using the iOS APIs since they are fairly simple to use. Keep in mind you need to test on device and iOS 11 had a lot more privacy changes in it so I'd look around for others having issues with the significant updates. |
if you are willing to use VOIP push see this link - https://www.appcaretaker.com/2018/06/05/how-to-get-iphone-ipad-current-location-even-if-app-is-terminated-not-running-in-background/ |
@sheshnathiicmr link is not working. is any other option. |
I want to get user current location even if the app is killed or terminated. And When user start walking, location must be updated even if the app is killed or terminated.. Is it possible ??
The text was updated successfully, but these errors were encountered: