Note that there are some explanatory texts on larger screens.

plurals
  1. POTerminating app due to uncaught exception on ipad/iphone
    primarykey
    data
    text
    <p>I'm getting a crash from this routine (IBAction)curr:(id)sender. So I could determine which button called it. The crash occurs when i press the button which calls the above method(curr). It has to display current user location eventually it does but it crashes immediately after showing latitude and longitude. received data as string</p> <pre><code>{ Error = "Lat must be provided"; Success = 0; } </code></pre> <p>It throws exception:<code>Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFDictionary objectAtIndex:]: unrecognized selector sent to instance 0x6e20000'</code></p> <p>Here is my code:</p> <pre><code>-(IBAction)curr:(id)sender { count=0; NSLog(@"fhfg"); NSLog(@"%@",latu); NSLog(@"%@",longs); locationManager = [[CLLocationManager alloc] init]; locationManager.delegate = self; locationManager.distanceFilter = kCLDistanceFilterNone; // whenever we move locationManager.desiredAccuracy = kCLLocationAccuracyHundredMeters; // 100 m [locationManager startUpdatingLocation]; } - (void)locationManager:(CLLocationManager *)manager didUpdateToLocation:(CLLocation *)newLocation fromLocation:(CLLocation *)oldLocation { if (count==0) { int degrees = newLocation.coordinate.latitude; double decimal = fabs(newLocation.coordinate.latitude - degrees); int minutes = decimal * 60; double seconds = decimal * 3600 - minutes * 60; latu= [NSString stringWithFormat:@"%d° %d' %1.4f\"", degrees, minutes, seconds]; //a=latu; NSLog(@" Current Latitude : %@",latu); //latLabel.text = lat; degrees = newLocation.coordinate.longitude; decimal = fabs(newLocation.coordinate.longitude - degrees); minutes = decimal * 60; seconds = decimal * 3600 - minutes * 60; longs = [NSString stringWithFormat:@"%d° %d' %1.4f\"", degrees, minutes, seconds]; NSLog(@" Current Longitude : %@",longs); } } </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload