Parse를 사용하고 XCode 6 (Yosemite 설치)으로 업그레이드했습니다. 그때까지는 앱이 정상적으로 작동했지만 이제는 첫 번째 화면 (로그인보기 컨트롤러)을로드하지도 않습니다.잡히지 않은 예외로 인해 앱이 종료 됨 iOS
다음은 오류 메시지입니다 :
2014-10-21 00:30:34.754 Hi App[393:143637] *** Terminating app due to uncaught exception
'NSInvalidArgumentException', reason: 'Cannot do a comparison query for type: (null)'
*** First throw call stack:
(0x25e03e3f 0x334b1c8b 0x25e03d85 0x8d173 0x785fd 0x5fee3 0x292b785f 0x2934b51f 0x2934aff3
0x2934ad5d
0x2934acf1 0x2929f677 0x28cc7ccd 0x28cc36b5 0x28cc353d 0x28cc2f21 0x28cc2d25 0x29503395 0x2950413d
0x2950e549 0x29502557 0x2c5450e9 0x25dca5b5 0x25dc9879 0x25dc83b3 0x25d16621 0x25d16433
0x2930656f
0x29301359 0x5d1b5 0x33a31aaf)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)
가 여기 내 loginviewcontroller.m입니다 :
- (void)viewDidLoad
{
[super viewDidLoad];
self.navigationItem.hidesBackButton = YES;
}
- (IBAction)login:(id)sender {
NSString *username = [self.enterUsername.text stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]];
NSString *password = [self.enterPassword.text stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]];
if ([username length] == 0 || [password length] == 0) {
UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:@"Oops!"
message:@"Please enter a username, password."
delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil];
[alertView show];
}
[PFUser logInWithUsernameInBackground:username password:password block:^(PFUser *user, NSError
*error) {
if (error) {
UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:@"Sorry!"
message:[error.userInfo
objectForKey:@"error"]
delegate:nil cancelButtonTitle:@"OK"
otherButtonTitles:nil];
[alertView show];
}
else {
[self.navigationController popToRootViewControllerAnimated:YES];
}
}];
}
오류는 매우 명확합니다. '유형에 대한 비교 쿼리를 수행 할 수 없습니다 : (null)'그래서 사용자 이름이나 비밀번호가 0이 아닌지 다시 한 번 확인합니다. – Lefteris