cllocationmanager

What can we use instead of nstimer?

為{幸葍}努か 提交于 2019-12-10 15:02:16
问题 I can get the GPS location in the background using [locationManager startUpdatingLocation] , but I don't know how to schedule it. I have used NSTimer for scheduling but many of them are saying that NSTimer will get expire if the application enters background. I want to know how to schedule calling the method , if we are not using NSTimers. 回答1: Apple provides 5 kinds of app task to run in background: Apps that play audible content to the user while in the background, such as a music player

Appropriate way to get user's location(also in killed state) for an “hyperlocal” app

ぐ巨炮叔叔 提交于 2019-12-10 13:22:57
问题 Requirement - I am building a hyperlocal app which will provide offers to user based on his location. When in app I can get his current location and show offers accordingly but what I need now is to send push notification to user based on his location. So I want to find out user's location and send offers based on his location. I have read Apple doc for Significant-Change Location Service but then this answer is saying that it won't work once app is killed. I have also read about Tracking the

iOS Region Monitoring not working

寵の児 提交于 2019-12-10 11:34:00
问题 I have been doing some iOS development for a couple of months and recently I am developing a bus app. I am currently mimicking the bus' movements and set up multiple annotations on the bus stops. For test purposes, I have setup just one bus stop and am trying to monitor when the bus has entered this region and exited as well. Strangely, my didStartMonitoringForRegion method is called perfectly but neither the didEnterRegion nor didExitRegion methods are called. Every time I run the program,

Is geofence accuracy dependent on locationManager’s accuracy or distance filter?

倖福魔咒の 提交于 2019-12-10 10:44:11
问题 Is geofence accuracy dependent on locationManager’s accuracy or distance filter? Or they are independent of each other because geofence is managed by the OS and uses Wifi/Cell tower info? For example: locationManager locationManager.distanceFilter = 1250; locationManager.desiredAccuracy = kCLLocationAccuracyKilometer; region let title = "Lorrenzillo's" let coordinate = CLLocationCoordinate2DMake(37.703026, -121.759735) let regionRadius = 550.0 let region = CLCircularRegion(center:

IOS 8 CLLocationManager Issue (Authorization Not Working)

落花浮王杯 提交于 2019-12-10 10:36:11
问题 #import "MyLocationViewController.h" #define NSLog(FORMAT, ...) printf("%s\n", [[NSString stringWithFormat:FORMAT, ##__VA_ARGS__] UTF8String]); @interface MyLocationViewController () @end @implementation MyLocationViewController { CLLocationManager *locationManager; } - (void)requestAlwaysAuthorization { [locationManager requestAlwaysAuthorization]; } - (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading the view, typically from a nib. self.mapView

GPS app stopped working on iOS 5 - Location Manager not updating

给你一囗甜甜゛ 提交于 2019-12-10 10:26:37
问题 I have developed an app targeted for iOS 4.3. It worked fine. But since I migrated to iOS 5.0, the app has started showing strange behavior. The location manager is not showing updates on change in position. Has anyone encountered this kind of problem? Thanks for any help. 回答1: I had my fare share with CLLocation manager weird updating issues when moving from iOS 4.x to 5: Have you subclassed the CLLocationManager object ? problem : In that case sometime the delegate methods sometime don't

Disabling allowsBackgroundLocationUpdates (CLLocationManager) doesn't work after is was enabled

天大地大妈咪最大 提交于 2019-12-10 09:25:43
问题 My Application works with continuous background location updates. Of course it has all the permissions and other stuff like allowsBackgroundLocationUpdates = true Initially I wanted to react to LowPowerMode changes while in background using NSProcessInfoPowerStateDidChange notification. And to disable allowsBackgroundLocationUpdates to stop updating locations without calling stopUpdatingLocation . However, I found out that after receiving the notification and setting

iOS: How to convert MKMapPoint or CLLocationCoordinate2D to UTM?

人盡茶涼 提交于 2019-12-10 09:19:15
问题 From what I have read this takes some complicated Math that I am not good at. So, I am asking here. Does anyone have experience converting a MKMapPoint or CLLocationCoordinate2D to a UTM value? I found this resource (http://www.uwgb.edu/dutchs/usefuldata/UTMFormulas.HTM) but the math is overwhelming. 回答1: You could use one lib to do that, or analyze the code of one lib to understand the algorithm and do it yourself. This is a c++ lib that does the job: http://geographiclib.sourceforge.net

iOS 4 application lifecycle behavior of standard location service running in background

可紊 提交于 2019-12-09 23:03:12
问题 I'm working on a location tracking application that uses both the standard location service and significant change location service in the background (my app is registered for background location updates in iOS 4+) as applicable. Thanks to this question I have a solid understanding of how significant change comes back from the background state and relaunches from a terminated state. However, I'm still not clear on how the standard location service behaves in these instances. Could anyone

CLLocationManager delegate methods not being called on background

家住魔仙堡 提交于 2019-12-09 21:23:16
问题 I'm building an application that checks if the user is near a store of my client, if it does, it sends him a notification. I want the app to check it in the background as well. I've added this lines to my info.plist file: image and here is my code: AppDelegate.m : -(BOOL)application:(UIApplication *)application willFinishLaunchingWithOptions:(NSDictionary *)launchOptions { [self configureLocationManager]; [self.locationManager startUpdatingLocation]; return YES; } -(void