cllocationmanager

How Can I Continue updating my location even when app is killed or removed from background in ios?

南楼画角 提交于 2019-11-30 16:29:21
My app requires to update location continuously, even if app is killed or removed from background. It works fine in foreground and even in background mode.but not working when app is killed. I've tried some code. func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { self.startLocationService() if ((launchOptions?[UIApplicationLaunchOptionsLocationKey]) != nil) { self.locationmanager = CLLocationManager() self.startLocationService() } print("Location Updates started") return true } func startLocationService() { self

Need to get more than 20 notification for Region Monitoring

点点圈 提交于 2019-11-30 16:26:20
I'm developing an application where user can set multiple locations. I get succeed to show notifications when user get Enter or Leave specific location boundary. Now, there is situation that i need to provide monitoring for all saved locations and it can be hundreds and more. I've read in Apple Forum and many where that iOS devices allow only 20 Region Monitoring. I've develop my code to exceed this situation. I've set locationManager.distanceFilter = 200; and when i get update for location. Firstly, i've stop all Region Monitoring and by conditions for nearest locations and again start Region

Need to get more than 20 notification for Region Monitoring

大兔子大兔子 提交于 2019-11-30 16:08:42
问题 I'm developing an application where user can set multiple locations. I get succeed to show notifications when user get Enter or Leave specific location boundary. Now, there is situation that i need to provide monitoring for all saved locations and it can be hundreds and more. I've read in Apple Forum and many where that iOS devices allow only 20 Region Monitoring. I've develop my code to exceed this situation. I've set locationManager.distanceFilter = 200; and when i get update for location.

iOS: Why does “Turn on Location Services” alert show twice upon startup?

二次信任 提交于 2019-11-30 14:24:56
问题 When I have location services disabled, this alert shows up twice. The first time is without the location manager purpose property displayed. Immediately after that (before a button of first alert is touched), it shows again, this time with the purpose property included. When the second alert is dismissed, the first alert is still there. This is a little annoying, and I would expect it to be confusing to the users. What can I do to only show it once, with the purpose property? 回答1: I had both

startMonitoringSignificantLocationChanges not working in swift

本秂侑毒 提交于 2019-11-30 13:46:13
I'd added CLLocationManager in my app using Swift in the AppDelegate file. In the Appdelegate.swift file, import CoreLocation @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate, CLLocationManagerDelegate { var locationManager: CLLocationManager! In the didbecomeActive method: func applicationDidBecomeActive(application: UIApplication) { if((locationManager) != nil) { locationManager.stopMonitoringSignificantLocationChanges() locationManager.delegate = nil locationManager = nil } locationManager = CLLocationManager() locationManager.delegate = self locationManager

iphone Location Services code that works on OS 4.1 in appstore

一笑奈何 提交于 2019-11-30 10:51:08
There's a bug in OS 4.1 that has broken location services for some iPhone apps ( https://devforums.apple.com/message/306250 ). Basically location services fails to turn on, and doesn't even ask the user for permission to get their location. The worst thing about the bug is that it doesn't occur when you're installing the app to a device from XCode, it occurs you when you're downloading from the App Store! This makes it almost impossible to test for a fix. Not everyone's app has been affected, so I'm trying to find out what causes it. Does anyone have any location services code that's NOT

If background applications can't launch automatically how does Cardcase launch on a location change?

两盒软妹~` 提交于 2019-11-30 10:35:24
The Cardcase application lets you know if you approach a shop which you have a previous relationship with (if you've set up a tab for payments there etc.). If background running applications cannot be started automatically on device boot, how does this app therefore work? Edited to make my question clearer: I am not asking how to monitor for location changes or how to monitor for location changes in the background. My question is, if the user install this app, then adds some tabs for some locations, then they reboot their iPhone, then how can this app subsequently notify them when they

iOS: Why does “Turn on Location Services” alert show twice upon startup?

核能气质少年 提交于 2019-11-30 10:34:53
When I have location services disabled, this alert shows up twice. The first time is without the location manager purpose property displayed. Immediately after that (before a button of first alert is touched), it shows again, this time with the purpose property included. When the second alert is dismissed, the first alert is still there. This is a little annoying, and I would expect it to be confusing to the users. What can I do to only show it once, with the purpose property? I had both a map controller object and a location manager object instantiated in my app delegate. mapController = [[

recieving location updates after app is terminated

喜你入骨 提交于 2019-11-30 09:56:16
I need to keep track of the user location all the time (but not drain the battery). I understand the only way to get updates after app is terminated is using startMonitoringSignificantLocationChanges. From Apple's Location Awareness Programming Guide on startMonitoringSignificantLocationChanges: If you start this service and your application is subsequently terminated, the system automatically relaunches the application into the background if a new event arrives. In such a case, the options dictionary passed to the application:didFinishLaunchingWithOptions: method of your application delegate

iOS 9 how get locations even if app terminated

↘锁芯ラ 提交于 2019-11-30 08:50:50
问题 I understand how retrieve locations in background. And I understand that there is a chance to get locations even if terminated Continious location updates even if app is terminated in iOS But. I have app Moves and Foursquare. If this app even not running (I terminate all apps and no apps running) and then I go to 'Privacy' and change for this apps locations to disable (Never), I can see that arrow in status bar disappeared. But when I enable location updates (Always), arrow again appeared in