core-location

addressDictionary is deprecated: first deprecated in iOS 11.0 - Use @properties

若如初见. 提交于 2019-12-04 07:29:50
I'm working with to get locations and address. For i'm getting location successfully but at the time getting address i'm getting warning like, 'addressDictionary' is deprecated: first deprecated in iOS 11.0 - Use @properties Is any solution for this... In Swift 5 //let location: CLLocation = CLLocation(latitude: 16.511131, longitude: 80.658725)//Convert lat & lng in to CLLocation let geocoder = CLGeocoder() geocoder.reverseGeocodeLocation(location) { (placemarksArray, error) in print(placemarksArray!) if (error) == nil { if placemarksArray!.count > 0 { let placemark = placemarksArray?[0] let

CLLocationmanager delegate method is not working in xcode6 [duplicate]

我只是一个虾纸丫 提交于 2019-12-04 07:17:35
This question already has an answer here: Location Services not working in iOS 8 26 answers i am created new project in Xcode6 and added the old files to this project(old files is created in xcode5) ,But whats happening is everything working fine, but "didUpdateToLocation" delegate method is not calling, i also used "didUpdateLocations" delegate method but both are not working.Code i have used from old file but the core location framework has been added from xcode6 ,I don't know what i am missing please anyone guide me to get a solution. If you're testing this on iOS 8 device / Simulator, old

iOS Swift - Reload location function with NSTimer for app background doesn't work

怎甘沉沦 提交于 2019-12-04 06:51:09
I've got a problem with location services. I can't set up a function that updates my location coordinates in the background by a NSTimer. Here is my code from appDelegate: var locationManager = CLLocationManager() func applicationDidEnterBackground(application: UIApplication) { self.locationManager.delegate = self self.locationManager.desiredAccuracy = kCLLocationAccuracyBest self.theTimer = NSTimer(fireDate: NSDate(), interval: 40, target: self, selector: "handleTimer", userInfo: nil, repeats: true) NSRunLoop.currentRunLoop().addTimer(self.theTimer, forMode: NSDefaultRunLoopMode) } func

Calculating Cumulative elevation gain give me wierd results

蹲街弑〆低调 提交于 2019-12-04 06:41:04
问题 I have the app that use CoreLocation and track user movement. When user is walking or driving I save each coordinate to local database (lat/lng/alt) so I can draw route based on saved coordinates. A few days ago I have added Cumulative elevation gain and I use this code in didLocationUpdate: - (void)locationManager:(CLLocationManager *)manager didUpdateToLocation:(CLLocation *)newLocation fromLocation:(CLLocation *)oldLocation { netElevationGain += MAX(0, oldLocation.altitude - newLocation

Error in main thread: MKNormalizedPointForLayer

半城伤御伤魂 提交于 2019-12-04 05:41:46
问题 I am developing Core-Location based iPhone application and there is some strange error. When I send app in the background state and send it back to foreground, in main thread is error named MKNormalizedPointForLayer and nothing more. Where I have to go to find solution? Google is poor about it. 来源: https://stackoverflow.com/questions/9766272/error-in-main-thread-mknormalizedpointforlayer

CLLocationManager requestWhenInUseAuthorization() not working

感情迁移 提交于 2019-12-04 03:41:47
问题 I am trying to use location services in my iOS app but for some reason requestWhenInUseAuthorization is not working. When the user first uses the app, the prompt comes up as normal asking for permissions but then when you open the app a second time, for some reason didChangeAuthorizationStatus method is not called so I cannot display the user current location on the map. My code is below: override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view,

Location accuracy defined - iOS

ε祈祈猫儿з 提交于 2019-12-04 03:17:06
What is the statistical intention, even if an approximation, of the returned "accuracy" or "uncertainty" on iOS? For instance Android documentation gives an interpretation of its returned accuracy figure as being approximately one standard deviation in this sense: We define accuracy as the radius of 68% confidence. In other words, if you draw a circle centered at this location's latitude and longitude, and with a radius equal to the accuracy, then there is a 68% probability that the true location is inside the circle. In statistical terms, it is assumed that location errors are random with a

Bring up the “App Would Like to Use Your Current Location” dialogue again [duplicate]

随声附和 提交于 2019-12-04 02:51:10
This question already has an answer here : Closed 7 years ago . Possible Duplicate: Is it possible to call alert “Allow to use current location” manually? in my app, all of the functionality is based on the users current location. The audience is everything else than geeky. I think about the user starts the app for the first - as a user is not really sure about what it can do, s/he might be confused about the app's "Would Like to Use Your Current Location?" If he answers with "Don't allow", he won't get any data on the screen. Now I handle: - (void)locationManager:(CLLocationManager *)manager

Check user location age in Mapkit - GPS accuracy for MapKit User Location significantly better than from CLLocationManager?

社会主义新天地 提交于 2019-12-04 02:06:02
问题 Indoors on an iPhone 4. WiFi disabled Running the LocateMe SDK sample or my own code for 30-60 seconds produces horizontal accuracy of 2294 meters. Pretty inaccurate but reasonable for cell tower triangulation. Looking at other apps that do reverse geocoding or location stuff like Foursquare shows a similar lack of accuracy. However, if I switch over to another view in my app that uses Mapkit and check/display the user location it is spot on. I mean to the house level accurate on the map

Can I test Significant-Change with Xcode simulator?

只愿长相守 提交于 2019-12-04 01:28:50
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 I've answered this question before on SO, and using the simulator is not an accurate way to test for -startMonitoringSignificantLocationChanges. This method relies primarily on cell-tower triangulation and hand offs. You can occasionally get an initial fix from