cllocationmanager

What is CoreLocation's Region Monitoring system defined cushion?

陌路散爱 提交于 2019-12-06 05:29:37
I'm using the simulator to test region monitoring. Using CoreLocation with region monitoring and the Freeway Drive test location path in the Simulator (Debug > Location > Freeway Drive) I'm able to simulate, at least visually the path of the Freeway Drive as it intersects with various overlays. Those overlays are converted to regions and monitored as soon as I start monitoring the user's location. Anyway, this doesn't seem to work very well. The regions represented by my overlays don't cause didEnter/didExit events when you "think" they would. The regions seem to be much wider in size than the

CLLocationManager and tvOS - RequestWhenInUseAuthorization() not prompting

↘锁芯ラ 提交于 2019-12-06 05:15:35
I seem to be having a little trouble getting tvOS to prompt the user for location data authorization. I literally copied and pasted working code from iOS and it seems to not be prompting the user. I am using the code listed below as well as the NSLocationWhenInUseUsageDescription key with a string value. The only difference in the api that I see is on iOS it uses startupdatinglocation() and on tvOS it uses requestLocation() (similar to watchOS) I've stepped through the problem and it is infact hitting requestWhenInUseAuthorization() but simply doesn't prompt the user. Any idea what is going on

didUpdateLocations not being called

回眸只為那壹抹淺笑 提交于 2019-12-06 05:07:27
问题 I have my object set as the locationManager's delegate, and the didChangeAuthorizationStatus method is called, which does this: func locationManager(manager: CLLocationManager!, didChangeAuthorizationStatus status: CLAuthorizationStatus) { if status == CLAuthorizationStatus.AuthorizedWhenInUse { self.locationManager.startUpdatingLocation() } } I also have this method, which never gets called following this: func locationManager(manager: CLLocationManager!, didUpdateLocations locations:

How to detect user selects Don't Allow for MKMapView for iphone

血红的双手。 提交于 2019-12-06 03:47:14
问题 I have created a application which uses mapview. For maps I used MKMapKit library. Everything works fine when user selects "Allow" button on alert window. But I want to detect when user selects "Don't Allow". I found a delegate which most of the developers used (void)locationManager:(CLLocationManager *)manager didFailWithError:(NSError *)error but the delegate does not get called. Maybe I am missing something. In my header (.h) file I have implemented MKMapViewDelegate . Is there anything

iBeacon - Difference between proximityUUID and region.identifier

泄露秘密 提交于 2019-12-06 03:44:24
问题 I am a bit confused about the importance of a CLBeaconRegion UUID and the string identifier. If my CLBeaconRegion already has an unique ID, what is the point of forcing the usage of an additional, non-unique string identifier? Is it purely "cosmetic"? Since users will not be able to scan and connect to beacon regions as they do with WiFi (and SSIDs) for example, and since the receiver app needs the CLBeaconRegion pre-coded and pre-defined in order to enter and range for beacons in a region,

When does an iphone application receive didChangeAuthorizationStatus: delegate call?

孤街醉人 提交于 2019-12-05 23:15:11
问题 I have a question about CLLocationManagerDelegate . The documentation says if the user changes the settings for your location services (in the iPhone's Settings.app) then your app is supposed to receive an didChangeAuthorizationStatus: message to the delegate. My question is, when would this happen? If the user changed the setting, it means they are in the settings app, and your app is either backgrounded or not running at all, so in the former case, when would your app's CLLocationManager

User's location and battery's consumption

橙三吉。 提交于 2019-12-05 19:22:40
I am working on an iOS app that's focuses on pedestrians in a block of buildings (campus). I have developed a good enough (I believe) user's location update but, I would like anyone more expert than me to give me some tips, advices on accurate location, battery's issues etc. In addition, is it possible to stop the location update and start it again after n seconds? Is a thought that I did in order to save energy. As it is at the moment, app is detecting current location, but, blue dot (user) is still moving around and I don't like that. There is something that can be done? Below is my

iOS: How to convert MKMapPoint or CLLocationCoordinate2D to UTM?

亡梦爱人 提交于 2019-12-05 17:06:04
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. 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/html/ http://geographiclib.sourceforge.net/html/classGeographicLib_1_1UTMUPS.html I found this website (http:

significant location change does not trigger at least every 15min

对着背影说爱祢 提交于 2019-12-05 15:57:19
According to apple docs, significant location change should update location at least every 15min. I am indeed receiving updates when I move significantly, but not when the device is stationary. What is your experience with updates? Do they come at least every 15min? If GPS-level accuracy isn’t critical for your app and you don’t need continuous tracking, you can use the significant-change location service. It’s crucial that you use the significant-change location service correctly, because it wakes the system and your app at least every 15 minutes, even if no location changes have occurred,

Can I test Significant-Change with Xcode simulator?

寵の児 提交于 2019-12-05 15:13:13
问题 I wonder if I could test Significant-Change location service (startMonitoringSignificantLocationChanges method ) in Xcode Simulator or it just only works in actual device. Notice, I already tried it in Simulator and it didn't work, but I'm not sure if this only because it don't work on simulator or because I did something wrong. Thanks 回答1: I've answered this question before on SO, and using the simulator is not an accurate way to test for -startMonitoringSignificantLocationChanges. This