cllocationmanager

Location detection in WatchOS simulator has been failed

我怕爱的太早我们不能终老 提交于 2019-12-11 06:27:44
问题 How to simulate a location for watchOS simulator? using with request - (void) requestLocation { locationManager = [CLLocationManager new]; locationManager.delegate = self; [locationManager requestWhenInUseAuthorization]; [locationManager requestLocation]; } I always catch an error: - (void)locationManager:(CLLocationManager *)manager didFailWithError:(NSError *)error { // Error here if no location can be found } The error is NSError * domain: @"kCLErrorDomain" - code: 0 0x7a867970 回答1: In

iOS 11 deferredLocationUpdatesAvailable always return NO and Error Domain=kCLErrorDomain Code=11. How to make deferredlocationupdates work?

泄露秘密 提交于 2019-12-11 05:15:42
问题 I am trying to use allowDeferredLocationUpdates(untilTraveled:timeout:) to defer the location updates. The documentation followed is https://developer.apple.com/documentation/corelocation/cllocationmanager/1620547-allowdeferredlocationupdates. Even though by trying various ways to detach the phone from debugger, keeping phone idle for longer duration the Deferring is not working. Please advice if someone has tried this on iOS 11. 回答1: Unfortunatly, despite of all documentation and after weeks

Not able to get the user's location in iOS 8 using CLLocation Manager?

≡放荡痞女 提交于 2019-12-11 02:55:11
问题 I tried to get the user's latitude and longitude but I got result 0.000000 - I have tried following code. I have assign the location manager variable. Location Manager allocated and set the delegate is self. Checked the iOS 8 version validation requesting. Using location start update location function. Code: locationmanager=[[CLLocationManager alloc]init]; locationmanager.delegate=self; // check before requesting, otherwise it might crash in older version if ([locationmanager

iPhone:Core Location popup issue

会有一股神秘感。 提交于 2019-12-11 00:17:09
问题 When I install my app in iphone and run first time then it ask user permission for core location service. Here is the image for simulator. In my app, my first view of application needs current location and based on location it lists some events. If application couldn't get location it shows the default list of events. So, I would like to know that Is it possible to hold the application flow until user click on either " Don't allow " or " ok " button ? I know if user clicks on "Don't allow"

When should I stop updating location manager?

坚强是说给别人听的谎言 提交于 2019-12-10 21:08:55
问题 I have an app that makes a call to get the user's location: -(void)getLocation{ locationManager = [[CLLocationManager alloc] init]; locationManager.delegate = self; locationManager.distanceFilter = kCLDistanceFilterNone; locationManager.desiredAccuracy = kCLLocationAccuracyBest; [locationManager startUpdatingLocation]; } //SET USER LOCATION -(void)locationManager:(CLLocationManager *)manager didUpdateLocations:(NSArray *)locations { self.userLocation = [locations lastObject]; NSLog(@"location

Hows does Significant Location Change work?

老子叫甜甜 提交于 2019-12-10 20:49:55
问题 Can anyone confirm how Significant Location Change works? movement is calculated when the iPhones cell receiver swaps from one cell tower to another as the user moves around? movement is calculated by triangulating between "visible" cell towers to best calculate the users position? movement is calculated by triangulation between "visible" cell towers based on the settings associated with desiredAccuracy? 回答1: Number 1 is the right answer. This is the reason, those updates come not very often.

CLLocation altitude property validity in flight

风格不统一 提交于 2019-12-10 20:05:33
问题 I understand the concept of negative for below sea levels and positive for above + there is vertical accuracy to check the sanity of this value. I am interested in GPS data in a flight. What could be the max or approx max value of altitude so that I can differentiate Flight from road travel. I understand I can query the speed but speed itself won't solve the purpose. 回答1: The proper way to determine flight from GPS altitude is to lookup the ground elevation of the current location (latitude

difference between didEnterRegion and didRangeBeacons

落花浮王杯 提交于 2019-12-10 17:39:29
问题 What is the exact difference between didEnterRegion and didRangeBeacons in terms of use case i mean when i should implement didEnterRegion/didExitRegion and when should i implement didRangeBeacons ? What are the each delegate method's exact functionality ? From apple's documentation it's not very clear. - (void)locationManager:(CLLocationManager *)manager didEnterRegion:(CLRegion *)region { } AND - (void)locationManager:(CLLocationManager *)manager didRangeBeacons:(NSArray *)beacons inRegion:

startMonitoringForRegion is not calling didEnterRegion if the app is started within the region

大城市里の小女人 提交于 2019-12-10 17:37:26
问题 I'm having an issue where my app will not fire the didEnterRegion event if I start the app within the region. If I start the app outside the region and then enter the region, it fires. If I start the app inside the region, then leave the region, then re-enter the region, it fires. Any suggestions on how to get it to fire as soon as the app is opened if it's in the region would be much appreciated! 回答1: I don't think you can do that. But, you can get the current location and check if it's

Delegate must respond to locationManager:didUpdateLocations swift eroor

有些话、适合烂在心里 提交于 2019-12-10 17:25:42
问题 Hy guys, I'm making an app in swift 3.0 but I ran across a problem pretty soon. I set up necessary functions to ask for permission to use a location but every time I run the app I get the same error... Viewcontroller.h import UIKit import MapKit class ViewController: UIViewController { let locationManager = CLLocationManager() override func viewDidLoad() { super.viewDidLoad() locationManager.delegate = self locationManager.desiredAccuracy = kCLLocationAccuracyBest locationManager