cllocationmanager

Location manager didUpdateLocations not being called

对着背影说爱祢 提交于 2019-12-02 05:46:00
For some reason didUpdateLocations is not being called, even when I set the delegate to the view controller. In info.plist I set the key Privacy - Location When In Use Usage Description to a description. So I'm not sure what I could be doing wrong? import MapKit import CoreLocation class OptionsViewController: UIViewController, UITableViewDelegate, CLLocationManagerDelegate { override func viewDidLoad() { //Ask user for location locationManager = CLLocationManager() locationManager.requestWhenInUseAuthorization() //Use users current location if no starting point set if CLLocationManager

iOS 8 CLLocationManager enterRegion: not getting called if use requestWhenInUseAuthorization

怎甘沉沦 提交于 2019-12-02 04:23:41
问题 I'm trying to get being called the delegate method locationManager:didEnterRegion in iOS 8 for custom region. Here is the code: self.locationManager = [[CLLocationManager alloc] init]; self.locationManager.delegate = self; if ([self.locationManager respondsToSelector:@selector(requestWhenInUseAuthorization)]) { [self.locationManager requestWhenInUseAuthorization]; } CLCircularRegion *region = [[CLCircularRegion alloc] initWithCenter:CLLocationCoordinate2DMake(20, 20) radius:1000 identifier:@

why is my didEnterRegion delegate not called?

谁都会走 提交于 2019-12-02 03:26:41
I am developing an app that checks for Beacons but I am having issues that my delegate is never run when I enter a region, I know the beacon is ok and broadcasting because I can see it in other beacon apps like "locate beacon" I have configured the same UUID in the transmitter and the receiver app and I have double verified them so I am sure they are the same, below is my code that starts the locationManager and monitors for the region including the delegate. Debugs tells me the monitoring is started correctly as per below SelfCheckout[2977:845403] location Manager started to monitor regions:

iOS update location even when app is terminated

只谈情不闲聊 提交于 2019-12-02 03:24:11
问题 I'm trying to update users location even when app is terminated. I added maps, and background mode --> Location update to my .plist, and I set an local notification that will fire when location is updated. But it never got fired. I have this in AppDelegat.h : @interface AppDelegate : UIResponder <CLLocationManagerDelegate>{ CLLocationManager *locationManager; } and in AppDelegate.m - (BOOL)application:(UIApplication*)application didFinishLaunchingWithOptions:(NSDictionary*)launchOptions {

iOS update location even when app is terminated

ぃ、小莉子 提交于 2019-12-02 02:11:13
I'm trying to update users location even when app is terminated. I added maps, and background mode --> Location update to my .plist, and I set an local notification that will fire when location is updated. But it never got fired. I have this in AppDelegat.h : @interface AppDelegate : UIResponder <CLLocationManagerDelegate>{ CLLocationManager *locationManager; } and in AppDelegate.m - (BOOL)application:(UIApplication*)application didFinishLaunchingWithOptions:(NSDictionary*)launchOptions { locationManager = [[CLLocationManager alloc] init]; locationManager.delegate = self; locationManager

iOS 8 CLLocationManager enterRegion: not getting called if use requestWhenInUseAuthorization

余生颓废 提交于 2019-12-02 02:03:18
I'm trying to get being called the delegate method locationManager:didEnterRegion in iOS 8 for custom region. Here is the code: self.locationManager = [[CLLocationManager alloc] init]; self.locationManager.delegate = self; if ([self.locationManager respondsToSelector:@selector(requestWhenInUseAuthorization)]) { [self.locationManager requestWhenInUseAuthorization]; } CLCircularRegion *region = [[CLCircularRegion alloc] initWithCenter:CLLocationCoordinate2DMake(20, 20) radius:1000 identifier:@"asda"]; region.notifyOnEntry = YES; region.notifyOnExit = YES; [self.locationManager

Significant blocation change event in ios7 - Background service call

冷暖自知 提交于 2019-12-02 01:58:22
问题 I am using Significant location services in my app. If my app killed by system or force close by user, using event of Significant location change services I am sending location data to my server,in iOS 6. In iOS6 my app sends data to server after force close also. But in iOS 7 I am not getting this significant location change event. 回答1: As iOS 7 SDK is not under NDA anymore, I'm posting the answer here, for the sake of completion. As mentioned in answers here: Monitoring regions but location

How to get user location ? [macOS]

微笑、不失礼 提交于 2019-12-02 01:23:34
I am trying to get the user's current location using the following code, but it doesn't work. I have added both NSLocationWhenInUseUsageDescription key and NSLocationAlwaysUsageDescription key to my Info.plist file. Below is the code var locationManager = CLLocationManager(); override func viewDidLoad() { super.viewDidLoad() startReceivingLocationChanges(); } func startReceivingLocationChanges() { let authorizationStatus = CLLocationManager.authorizationStatus() if authorizationStatus != .authorizedAlways { // User has not authorized access to location information. print("not authorized");

Significant blocation change event in ios7 - Background service call

喜欢而已 提交于 2019-12-02 00:34:22
I am using Significant location services in my app. If my app killed by system or force close by user, using event of Significant location change services I am sending location data to my server,in iOS 6. In iOS6 my app sends data to server after force close also. But in iOS 7 I am not getting this significant location change event. Legoless As iOS 7 SDK is not under NDA anymore, I'm posting the answer here, for the sake of completion. As mentioned in answers here: Monitoring regions but location icon disappears when app is killed iOS 7 does not allow significant location changes in background

Geofencing didEnterRegion,didExitRegion function not Calling in iphone 5S iOS8.1

南笙酒味 提交于 2019-12-01 22:22:17
I had debugged all day and delegate did get called at all. - (void)locationManager:(CLLocationManager *)manager didEnterRegion:(CLRegion *)region Well here is my standard code calling for a monitor. use CoreLocation.framework. [locationManager startMonitoringForRegion:geofence]; And registered these in my plist. <key>NSLocationAlwaysUsageDescription</key> <string>Lugang</string> <key>NSLocationWhenInUseUsageDescription</key> <string>Lugang</string> background app refresh in enable, but I didn't see my app within. I had tried to print my monitoredRegions in instance of LocationManager and there