core-location

iOS Location update even app is not running (like find my iphone)

隐身守侯 提交于 2019-12-06 04:39:05
I want to write location tracking app like " find my iphone " that runs in foreground,background and even terminating ( not running) . Location will be sent to my server periodically time. I have searched in google and read many many documents,tutorials comments, codes about this topic. Then I have found this tutorial . But in this tutorial, location is sent to ".txt" file in foreground and background not terminating ... I mean, when the app is killed, it is not relaunched in the background to send location ".txt" file .. So I have added and updated some codes to send location when it is not

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,

Testing custom location with simulator

馋奶兔 提交于 2019-12-06 02:56:16
I just spent the last hour searching - thinking that there has to be an answer - and didn't find much, so I'm asking here. I'm trying to get the sample app Regions to trigger enter and/or exit regions updates via the simulator. I'm familiar with setting a specific latitude and longitude with Debug > Location > Custom Location but that doesn't seem to do much, although it does seem to work in the LocateMe sample app. At this point I don't know if the problem is a limitation of the iOS Simulator or of the way the sample app handles region detection (I'm still rather new to iOS). I've come across

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

随声附和 提交于 2019-12-06 02:55:16
问题 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... 回答1: Answer in swift - old way commented out: let street = placemark.thoroughfare! // addressDictionary!["Street"] as? String ?? " " let city = placemark.subAdministrativeArea! // addressDictionary!["City"] as? String ?? " " let state =

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

三世轮回 提交于 2019-12-06 00:32:20
问题 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,

CLLocationmanager delegate method is not working in xcode6 [duplicate]

蹲街弑〆低调 提交于 2019-12-06 00:26:15
问题 This question already has answers here : Location Services not working in iOS 8 (26 answers) Closed 5 years ago . 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

provide simple method to get current speed (implementing speedometer)

北慕城南 提交于 2019-12-06 00:06:04
Could you please give me example how to calculate current "speed", I'm working on my first simple app ala speedometer? I figure out to use didUpdateToLocation also I found that I need to use formula speed = distance / duration Is it right? how to calculate duration? The basic steps that you need to go through look something like this: Create a CLLocationmanager instance Assign a delegate with the appropriate callback method Check to see if the "speed" is set on the CLLocation in the callback, if it is - there's your speed (Optionally) if the "speed" isn't set, try calculating it from the

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

我们两清 提交于 2019-12-05 22:04:26
问题 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",

Location accuracy defined - iOS

荒凉一梦 提交于 2019-12-05 21:12: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

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,