core-location

MKReverseGeocoder server returned error: 503

痞子三分冷 提交于 2019-12-03 07:45:03
Currently i am developing an iPhone application where i have to show user's current city and location for which i am using Mapkit Framework.When i build the application it works fine and show me the exact city details .But right now when i try to build the application again application shows following error message in my log /SourceCache/ProtocolBuffer_Sim/ProtocolBuffer-26/Runtime/PBRequester.m:523 server returned error: 503 reverseGeocoder: didFailWithError:Error Domain=PBRequesterErrorDomain Code=6001 "Operation could not be completed. (PBRequesterErrorDomain error 6001.)" Is any body

CLGeocoder reverseGeocodeLocation returns 'kCLErrorDomain error 9'

三世轮回 提交于 2019-12-03 07:27:45
问题 I'm developing an iOS app with reverse geocoding features according to this article: geocoding tutorial But when I test like this on simulator, I get 'kCLErrorDomain error 9'. I've searched a lot and there are only error 0 or 1 not 9. Here is my code in viewDidLoad : self.locationManager = [[CLLocationManager alloc]init]; self.locationManager.delegate = self; self.locationManager.distanceFilter = 80.0; [self.locationManager startUpdatingLocation]; CLGeocoder *geocoder = [[[CLGeocoder alloc]

Location update even when app is killed/terminated

*爱你&永不变心* 提交于 2019-12-03 07:12:42
I am trying to get location updates even in all states, even when app is killed/terminated/suspended. I have enabled background fetch in xcode and implemented the following code(used reference " Capture location in all states app "). But when i terminate the app it's giving a red line on class AppDelegate. I do not understand what is the problem here.I have done this using the solution of the question " Getting location for an iOS app when it is in the background and even killed " here, But its not working in ios 9.Please help me out or tell me the other solution. UPDATED CODE - class

Ranging Beacons in iOS 10

那年仲夏 提交于 2019-12-03 06:49:30
In my app, I use Beacon Region Monitoring in CoreLocation. The app sets 2 proximityUUID as region (they have different id), and start ranging like following. #pragma mark - CLLocationManagerDelegate (void)locationManager:(CLLocationManager *)manager didEnterRegion:(CLRegion *)region { [self.locationManager requestStateForRegion:(CLBeaconRegion *)region]; } - (void)locationManager:(CLLocationManager *)manager didExitRegion:(CLRegion *)region { [self.locationManager stopRangingBeaconsInRegion:(CLBeaconRegion *)region]; } - (void)locationManager:(CLLocationManager *)manager didRangeBeacons:

Retrieving Location Data with Radius using Firebase & GeoFire

柔情痞子 提交于 2019-12-03 06:06:52
问题 I am trying to use GeoFire to retrieve and according to radius (for example, everything in 10km distance). To remain clear, I am saving the details and location separately in the database, so details' id is same with locations' id. While saving the data, I use: var details = ["a":"a", "b":"b", etc] let checkpointRef = eventRef.childByAutoId() checkpointRef.setValue(details) let checkpointId = checkpointRef.key let geofireRef = ref.childByAppendingPath("checkpointLocations") let geoFire =

iOS Location Services visits and system Frequent Location

左心房为你撑大大i 提交于 2019-12-03 04:53:12
I noticed that Frequent Location on iPhone seems to use much less battery than an app monitoring iOS Visits ( https://developer.apple.com/reference/corelocation/clvisit ). Frequent location on iPhone can be viewed on the phone via Settings -> Privacy -> Location Services -> System Services -> Frequent Locations. I would like to know if Visit monitoring service from CLLocationManager is the same as iOS Frequent location or is it on different system used by Apple. If Apple is using the same service why it does not have any impact on the battery? Joshua Briefman The two APIs are intended for

Convert address to coordinates swift

徘徊边缘 提交于 2019-12-03 02:51:56
问题 How can I convert a String address to CLLocation coordinates with Swift? I have no code yet, I looked for a solution but I didn't find anyone yet. Thanks. 回答1: This is pretty easy. let address = "1 Infinite Loop, Cupertino, CA 95014" let geoCoder = CLGeocoder() geoCoder.geocodeAddressString(address) { (placemarks, error) in guard let placemarks = placemarks, let location = placemarks.first?.location else { // handle no location found return } // Use your location } You will also need to add

What are the rules behind “X would like to use your current location” on the iPhone?

主宰稳场 提交于 2019-12-03 02:17:19
Using location-awareness on the iPhone triggers the "X would like to use your current location" - "Don't allow"/"OK". In the CLLocationManager documentation, it is stated: "The user has the option of denying an application’s access to the location service data. During its initial uses by an application, the Core Location framework prompts the user to confirm that using the location service is acceptable. If the user denies the request, the CLLocationManager object reports an appropriate error to its delegate during future requests." I found the "initial uses" to be two times if you hit "OK" to

iPhone development - Locate address from user's position

喜欢而已 提交于 2019-12-03 00:50:20
Is it possible to get the street/area where the user currently is by using the CoreLocation framework? So if I get the user's longitude and latitude position, can I get the address (xx street, yy city, z state) from that position? Thanks. Someone had already posted the question before. Just found out Get street address at lat/long pair What you would need is a reverse geocoding service, that will translate a lat/lon coordinate set in to an address. I doubt that this, or access to one, is included in CoreLocation. You could look into a third-party provider such as Google Maps: http:/

Region monitoring current location doesn't notify on exit

坚强是说给别人听的谎言 提交于 2019-12-03 00:48:36
I'm trying to test region monitoring, for that I'm getting current location like this: - (void)startLocationTracking { CLLocationManager *locationManager = [[CLLocationManager alloc] init]; // Start location manager if ([CLLocationManager locationServicesEnabled] && [CLLocationManager authorizationStatus] == kCLAuthorizationStatusAuthorized) { locationManager = [LocationTracker sharedLocationManager]; locationManager.delegate = self; [locationManager startMonitoringSignificantLocationChanges]; } } And tracking first location with region monitoring like this: -(void)locationManager: