cllocationmanager

multiple regionDidChangeAnimated calls - what gives?

泪湿孤枕 提交于 2019-12-13 20:10:49
问题 I have a MKMapView inside a UITableView as a custom cell (don't ask ;) - don't know if it matters really), for which I register a regionDidChangeAnimated delegate method. This method gets called three times when the UITableView is loaded - once with the actual region and then two more times with a region that is way off. In the simulator, I consistently get a region with center (+37.43997405, -97.03125000). On the device, it seems to depend on the location reported by the location manager,

startMonitoringForRegion when App close

送分小仙女□ 提交于 2019-12-13 19:36:21
问题 I am using startMonitoringForRegion to monitor specific region. When App is not running I have successfully generated a local notification when a user enters/leaves a particular location by comparing [launchOptions objectForKey:@"UIApplicationLaunchOptionsLocationKey"] in AppDelegate. But now I am not able to understand how can I know that a user enters in a location or leaves a location. I am not able to find a way to check the response. Can I show the response in the alert body? I searched

Understanding iBeacons in iOS: didDetermineState and didEnterRegion events

时光怂恿深爱的人放手 提交于 2019-12-13 18:45:29
问题 Part one: I have written the following code to monitor iBeacons. I would like to detect the didEnterRegion and didExitRegion event. However it never happens. Would you be able to take a look at the code and suggest what could be missing? I use the Apple AirLocate sample code to configure one device as iBeacon and perform the following steps to test my code: Steps: compile and execute AirLocate sample code on device B compile and execute this code on device A in device B use AirLocate app to

iOS 8 Swift sending user directly to location services from an Alert dialog

放肆的年华 提交于 2019-12-13 18:23:35
问题 When a user has location services turned off, I want to prompt to turn them on with a UIAlertController. One of the options in the Alert Controller should take them directly to location services (for the OS, not the app). Right now, I've gotten as far as being able to send the user to permissions for my specific app, but not for the overall OS location settings. Is there a way to send the user directly to the OS Location settings from the UIAlertController? Here is the current code (located

iOS re-check location on load from background

妖精的绣舞 提交于 2019-12-13 11:50:57
问题 I'm building an app which displays result data based on your current location. At the moment, I'm using the viewDidLoad method of a UIViewController to start the CLLocationManager and getting the current location. Once I have the location that matches the accuracy I desire, I do a request to my web service to get the results and dump it into a UITableView . My problem is that when you close the app (although it's still running in the background). If you were to drive to another town, re-open

location not determined using daemon

别来无恙 提交于 2019-12-13 08:22:14
问题 trying to get location using a daemon on ios looked at this CLLocationmanager setAuthorizationStatus doesn't work (jailbreak) but keep getting location not determined i have entitlements set (checked with ldid) got an info.plist where the binary is and added the following keys to clients.plist but still cant get location <key>com.apple.locationd.executable-{binary_path}</key> <dict> <key>Authorized</key> <true/> <key>BundleId</key> <string>{any_random_bundle}</string> <key>Executable</key>

IOS didUpdateLocations called multi time

谁都会走 提交于 2019-12-13 07:56:46
问题 I'm using didUpdateLocation. Inside, I have called a webservices. And, I want to every 2 minutes, I will call webservices. But, didUpdateLocation update location multi time. So, I have to call webservices. This is not good. How to I can call webservices every 2 minutes. Please help me! 回答1: You have to trigger the call with something other than didUpdateLocation , because the frequency of that call is up to the user of the device, and not your code. If you only need to call the web service if

tvos Location Services prompt never prompted

假如想象 提交于 2019-12-13 07:24:34
问题 Have anyone gotten CLLocationManager to prompt for permission on tvos? I'm using the following code (that works on other platforms) to get a user's location and prompt for permissions. self.locationManager = [[CLLocationManager alloc] init]; self.locationManager.desiredAccuracy = kCLLocationAccuracyThreeKilometers; self.locationManager.delegate = self; [self.locationManager requestWhenInUseAuthorization]; [self.locationManager requestLocation]; However, the authorization delegate is called

Weird locations from CLLocationManager in iOS9

淺唱寂寞╮ 提交于 2019-12-13 07:16:36
问题 I have developed a walk app that can record distance, on iOS7, iOS8, the distance is mostly fine although sometimes not accurate, but on iOS9.0, the distance often too large, so I check - (void)locationManager:(CLLocationManager *)manager didUpdateLocations:(NSArray<CLLocation *> *) Locations method, and find some time get locations like this: A、B、C, but coordinate of C is equal to A, which i think is weird I find startUpdatingLocation called every seconds, after get rid of it , it gets

Store CLLocation Manager Values in Device swift

a 夏天 提交于 2019-12-13 05:45:10
问题 I'm building an app that sends (every x seconds) to an API the location values with some extra values (session, ID, etc) that is working nice (see here Update CLLocation Manager on another method). But for improved feature, we are considering the device can lost (for some amount of time) internet connection. So I need to temporary store all values and when reconnected send them again to the API. I'm considering several ways to do it: Core Data (difficult implementation) Realm (very little