core-location

Example for startMonitoringSignificantLocationChanges

人盡茶涼 提交于 2019-11-28 21:53:00
I am new to iPhone programming. I am looking for an example or a demo on how to use startMonitoringSignificantLocationChanges method with the CoreLocation Manager. I am confused by the documentation because, I am not sure if the same delegate method is called as in the case of invoking startUpdatingLocation . (i.e. the delegate locationManager: (CLLocationManager *)manager didUpdateToLocation: (CLLocation *)newLocation fromLocation: (CLLocation *)oldLocation is called) Any help on this would be appreciated. Also, I am testing it on the simulator by subclassing of CLLocationManager . This

startMonitoringForRegion never calls didEnterRegion/didExitRegion

99封情书 提交于 2019-11-28 21:34:42
问题 I try to get the iPhone4 to monitor regions and notify me by call didEnterRegion or didExitRegion. I can't get it to work. I was reading probably all related enries here, plus a couple more articles on the web....iOS just don't call my CLLocationManagerDelegate methods. What did I do: I have a simple AppDelegate which implements also the CLLocationManagerDelegate methods for didEnterRegion and didExitRegion. Within these methods I simply use a UILocalNotification to report the event. From a

Location tracking stops after a while when app is in the background

爷,独闯天下 提交于 2019-11-28 20:12:15
问题 I've created a simple app which tracks user location and creates local notification for every time location is updated. I enabled the background modes below, let locationManager = CLLocationManager() open override func viewDidLoad() { locationManager.delegate = self; locationManager.desiredAccuracy = kCLLocationAccuracyBest; locationManager.distanceFilter = 10 locationManager.allowsBackgroundLocationUpdates = true locationManager.startUpdatingLocation() } open func locationManager(_ manager:

Beacon Ranging in Background on iOS

。_饼干妹妹 提交于 2019-11-28 19:01:50
I understand the difference between monitoring and ranging, and I understand the limitation of iOS in that beacon ranging can only happen in the foreground or in the background when entering and exiting regions as explained here ( http://developer.radiusnetworks.com/2013/11/13/ibeacon-monitoring-in-the-background-and-foreground.html ). But I'm trying to figure out how to solve a common scenario. If I had a bunch of beacons installed in a department store, how am I supposed to detect when a person moves within range of those beacons? With the way it currently works, the app will get an event

Accuracy of Core Location

偶尔善良 提交于 2019-11-28 17:58:03
问题 I'm currently working on a location tracking app and I have difficulties with inaccurate location updates from my CLLocationManager . This causes my app to track distance which is in fact only caused by inaccurate GPS readings. I can even leave my iPhone on the table with my app turned on and in few minutes my app tracks hundreds of meters worth of distance just because of this flaw. Here's my initialization code: - (void)initializeTracking { self.locationManager = [[CLLocationManager alloc]

How to track user location in background?

那年仲夏 提交于 2019-11-28 16:44:22
I'm looking for an open source app or library to track user location in the background. Now I'm trying to do it with CLLocation and background tasks, but accuracy is not enough for my case. Could you explain, how apps, like "moves", "runkeeper", "endmondo", creates my route? Should I use Accelerometer or/and compass to create a route between CLLocation background points? Some code: //location manager init self.locationManager = [[CLLocationManager alloc] init]; self.locationManager.distanceFilter = kCLDistanceFilterNone; self.locationManager.desiredAccuracy = kCLLocationAccuracyBest; self

Measuring velocity via iPhone SDK

天涯浪子 提交于 2019-11-28 16:35:29
I need to implement a native iPhone app to measure the velocity of the phone (basically a speedometer). I know that you can do so via the CoreLocation API fairly easily, but I am concerned about battery consumption since this is to be a real-time measurement that could be used for up to a couple of hours at a time. My understanding is that while you are actively monitoring for events from the LocationManager (even though I don't actually care about GPS location) it is battery-intensive. The other obvious option to explore would be using the accelerometers to try and calculate speed, but there

How to solve Xcode 4.1 (LION) GPS error?

谁都会走 提交于 2019-11-28 16:19:25
My project worked perfectly on simulator+device, but now, after upgrading to lion os and xcode 4.1 , I get this error when gps is active! server did not accept client registration 68 It's a gps based application, and i'm nervous to not debug app in simulator! Any idea to solve this issue? UPDATE : Gps on Simulator doesn't work also on Xcode 3.2.6 + LION. EDIT : Apple response on bug tracker: After further investigation it has been determined that this is a known issue, which is currently being investigated by engineering. This issue has been filed in our bug database under the original Bug ID#

Background GPS in iOS. Is this possible?

六月ゝ 毕业季﹏ 提交于 2019-11-28 15:33:38
问题 I was wondering if it was possible to get the location of the iPhone with an app that isnt running, or at least running in the background. What I want to do is have the iPhone send a push notification when it arrives at a certain coordinate. Is this possible? If so, could someone put me in the right direction? Thanks, Ben 回答1: Yes, it is possible. Your application can ask to be notified of significant location changes or to simply continue using the GPS while executing in the background. The

Decoding the CLLocationAccuracy const's

北城以北 提交于 2019-11-28 15:24:18
问题 the following are listed in CLLocation.h but from my experience they are deceiving names- possibly originally thought up to serve two purposes, 1. to test the accuracy of the location returned, but also 2. to set how hard the location manager works, specifically what is enabled (gps (how many sat channels), how hard the wifi works, triangulation etc. extern const CLLocationAccuracy kCLLocationAccuracyBestForNavigation; // (raw value: -2) extern const CLLocationAccuracy kCLLocationAccuracyBest