AGSMapView.gps crashing iPad

401
1
02-26-2011 04:51 AM
ClintCabanero
Occasional Contributor
Hello all,

I'm using version 1 of the ArcGIS for iOS SDK.  In my iPad app, whenever I enable GPS (through ESRI's SDK) my mobile app crashes.  On the iPhone version, enabling GPS (through the ESRI SDK) does not.  Anyone have any tips on this using ESRI's SDK (I understand I can call Core Location directly but would like to go through ESRI's SDK for now) to properly enable GPS on the iPad?

Here is a code snippet which is the same for my iPad and iPhone version.  This gets invoked when a user clicks on a 'Round Rect Button' on my view.

- (IBAction)showUsersLocation:(id)sender {

if(self.mapView.gps.enabled == TRUE) {
 
  self.mapView.gps.stop;
}
else {
 
  self.mapView.gps.start;
 
  self.mapView.gps.autoPan = TRUE;
}
}

Thanks!
0 Kudos
1 Reply
ClintCabanero
Occasional Contributor
Oops ... I figured it out.  Just in case anyone runs into the same thing ... here is a repost that doesn't crash my iPad.  The change is using start and stop messages instead of setting properties.


- (IBAction)showUsersLocation:(id)sender {

if(self.mapView.gps.enabled == TRUE) {
 
  [self.mapView.gps stop];
}
else {
 
  [self.mapView.gps start];
 
  self.mapView.gps.autoPan = TRUE;
}
}
0 Kudos