In the following piece of code, loginString is 0 when an incorrect username password is entered and is 2061128143657912001 when a correct user name password is entered. However no matter what I do, I always get the pop up.
What am I missing?
//loginString is a 0 or a 2061128143657912001
if ([loginString intValue]>0) {
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
[defaults setObject:userName.text forKey:@"userNameKey"];
[defaults setObject:password.text forKey:@"passwordKey"];
[defaults synchronize];
[self dismissModalViewControllerAnimated:YES];
}else {
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Login Validation Error" message:@"Unable to validate Login/Password combination" delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil];
[alert show];
[alert release];
}