cllocationmanager

iPhone Objective-C: Ensure user allows location sharing before doing other actions

My application asks for location at the log in screen, and right now, the user can log in without sharing his or her location. When the user selects "No" for sharing location, an error that reads Error Domain=kCLErrorDomainCode=1 "The operation couldn't be completed. (kCLErrorDomain error 1.)" is thrown. I'm guessing that's because I am ...

CLLocation Manager not prompting user

I am using a method to create a location manager if it doesn't exist and start it. It checks if the user has location services disabled and respects that unless a BOOL is given to start the services anyway. The method returns a BOOL to indicate services have been started or not. This works fine for starting the service and prompting the...

Problems when switching to xcode 3.2.3 and simulator 4.0

Hi All, Here is a list of problems I have after building my app with xcode 3.2.3 and running it on simulator 4.0. Of course, all these issues did work with the previous environment. Location manager does not update location. It used to update with the location at Cupertino but now I get locationManager:didFailWithError: called with er...

locationServicesEnabled test passes when they are disabled in viewDidLoad

I have location services disabled for my application in the settings panel. I run a test in viewDidLoad in my view controller to see if they are enabled: if([CLLocationManager locationServicesEnabled]) { //Do something now } This test always passes for some reason. If I try and access location services I get a kCLErrorDenied erro...

Behaviour for significant change location API when terminated/suspended?

This is the section from the CLLocationManager documentation describing the app behavior with startMonitoringSignificantLocationChanges: If you start this service and your application is subsequently terminated, the system automatically relaunches the application into the background if a new event arrives. In such a case, t...

How do you get a one-time location to a specified accuracy?

In the documentation it says that it gets an approximate location and then keeps updating with finer and finer precision. I have a button that does [locManager startUpdatingLocation]; and then I implement - (void)locationManager:(CLLocationManager *)manager didUpdateToLocation:(CLLocation *)newLocation fromLocation:(CLLocation *)o...

iPhone CoreLocation - accuracy not working correctly!?

I am developing an app which uses gps. i need a high accuracy so i used kCLLocationAccuracyBestForNavigation for the desiredAccuracy. when i am running the app, the follwing method gets called as expected. (void)locationManager:(CLLocationManager *)manager didUpdateToLocation:(CLLocation *)newLocation fromLocation:(CLLocation *)oldLoca...

why Delegate Methods for CurrentLotion(CLLocationManager) is not called in iOS4.0?

Hi!I am using iPhone sdk 4.0.I have used below code for taking Current location but it's delegate methods is not called Automatically...My code is given below: in .hfile i have import CoreLocation/CoreLocation.h also delegate CLLocationManagerDelegate CLLocationManager *locationManager; in .mfile locationManager = [[CLLocatio...

How to handle invalid CLHeading updates?

When there is magnetic interference the built in heading calibration message is displayed. Also I noticed that if location is not available, magnetic heading is valid but not true heading. So what is the standard or best way to handle invalid heading updates? Should I just keep waiting for a valid heading to be received or show some cu...

CLLocationManager - strange Memory Leak

Hi Forum I'm implementing a CLLocationManager right as described in several tutorials. Everything works fine up to the point where the LocationManager receives a second update. Then a memory leak occurs. Instruments tells me, that the leaked objects are NSCFTimer, GeneralBlock-16 and NSCFSet Any ideas? Thanks for any help [Edit] ...

Presenting a walkway from position A to B in my app

So I have an iPhone app which should aid the user to find a convenient walkway from his/her own position to a given destination. As I have learnt, MKMapView does not provide an easy way to infer a preferred walking route from A to B. I can live with terminating my own app and launch the native map application on the iPhone, but in that ...

cllocation tracking a location

i've a gps tracker that now works great, except when iphone lost gps connection. When the connection is lost the track make one or more point to a random location (as you can see in this image: In which way i can discard this bad values? I've think to do in this way: before save my data i can do a sum of my integer values of current l...

iPhone direction/compass not detectable

Hey, I'm having a hard time figuring out what I'm doing wrong. I want do read the direction my iPhone is facing to. Here's my code: self.man = [[CLLocationManager alloc] init] ; self.man.delegate = self; self.man.desiredAccuracy = kCLLocationAccuracyNearestTenMeters; self.man.headingFilter = kCLHeadingFilterNone; if([self.man headingA...

How to calibrate altitude depending on position above sea level?

I'm building a simple altimeter app and I want to be able to calibrate the altitude depending on where I am located above sea level. So at the moment I am at 300m but I want to be able calibrate that so it says 0m, and make my location "sea level". How would I implement the calibration? MainView.h import import import @inter...

startMonitoringForRegion not working

I want Location based Reminder when user reaches to certain region For that I have writen followin code CLLocationManager *manager=[[CLLocationManager alloc] init]; manager.desiredAccuracy=kCLLocationAccuracyBest; manager.delegate=self; CLLocationCoordinate2D loc; loc.latitude=LReminder.lat; loc.longitude=LReminder.lon; CLRegion *...

startUpdatingLocation issue, cannot return to app

I have a weird bug. It seems like a platform issue but since it is only happening in my app, I guess it is not (: I can reproduce this about 50% of the time. When I call [locationManager startUpdatingLocation] and location services are DISABLED, the user is greeted with an alert box asking if they would like to go to the phone setti...

how to trap the location alert response iphone

Hii, I am using GPS in iphone and it show conformation message for use location service. and i want to trap what user select "Allow" or "No". can any one suggest how i do this? Thank ...

Typical time and horizontalAccuracy of iPhone CLLocation in practice

I'm wondering if anybody has done thorough empirical testing of the iPhone's ability to find its location. Obviously the performance and accuracy will depend on the type of area one is in (urban vs suburban vs remote). Just testing from the Simulator, I get a horizontalAccuracy of < 100 meters (98 meters) in a few seconds. I believe it ...

CLLocationManager does not worked in iphone 4 ios.

hi all, My Mac os version is 10.6.4 and xcode version is 3.2.3.I'm using WhereAmI program.I have used CLLocationManager to get current location it works fine in iphone 3 ios but does not works in iphone 4 ios.Can anybody tell me what is the problem.I'm not understanding what is the problem.I thing this problem is related to GPS Sett...

how to trap the location alert response iphone

Hii, I am using GPS in iphone and it show conformation message for use location service. and i want to trap what user select "Allow" or "No". can any one suggest how i do this? Thank ...