Going through the project you sent me, I see that you have @synthesize declarations, that were not in the copy and paste of your original post. This will eliminate the issue that I addressed in my original reply.
I missed your annotations in the
-(void) locationManagerDidResumeLocationUpdates:(CLLocatio nManager *)manager
method.
The first issue with your implementation of this method is that you are initializing an NSString with an alertView initialization. NSString does not have an initWithTitle:message:delegate… message. You then attempted to pass the string as a the message argument, and failed to set the delegate.
This is a correct way to implement this method, with the incorrect code commented out
Code:
-(void) locationManagerDidResumeLocationUpdates:(CLLocationManager *)manager
didFailWithError : (NSError *) error {
// NSString *msg = [[NSString alloc]initWithTitle : @"Error"
// message : msg
// delegate : nil
// cancelButtonTitle : @"Done"
// otherButtonTitles : nil];
NSString *msg = @"Location Update failed";
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Error"
message:msg
delegate:self
cancelButtonTitle:@"Done"
otherButtonTitles:nil];
[alert show]; //use of undeclared identifier 'alert'
// [message show];//use of undeclared identifier 'show'
[alert release]; //use of undeclared identifier 'alert'
}
The NSString is initialized with the message to be displayed in the alertView.
The alertView is allocated and initialized with a title and the NSString is passed as an argument. The delegate needs to be set so that responses from the alertView can be monitored, and additional action taken if needed. As you had implemented there was no alert variable and no message variable since they were never declared, allocated or initialized. The initialization that was done which I commented out was not valid, since it is not an NSString method.
After making these corrections the program will compile without errors but will crash if you run it. Checking your storyboard, if you control-click on the view controller there are three outlets with yellow warning triangles. They need to be deleted. Also in the storyboard the three outlets that remain need to be connected to the corresponding textfields. Without these connections data generated will not be displayed.
Bob