iOS SDK 8.0으로 업데이트되었습니다. backened로 parse.com 사용iOS SDK 8.0으로 업데이트하면 앱이 다운 됨
- (void)retrieveMessages {
PFQuery *query = [PFQuery queryWithClassName:@"Messages"];
[query whereKey:@"recipientIds" equalTo:[[PFUser currentUser] objectId]];
[query findObjectsInBackgroundWithBlock:^(NSArray *objects, NSError *error) {
if (error) {
NSLog (@"Error:%@ %@", error, [error userInfo]);
}
else {
//we found messages
self.messages = objects;
[self.tableView reloadData];
NSLog (@"Retrieved %d messages", [self.messages count]);
}
if([self.refreshControl isRefreshing]) {
[self.refreshControl endRefreshing];
}
}];
}
- (void)viewDidLoad
{
[super viewDidLoad];
self.moviePlayer = [[MPMoviePlayerController alloc] init];
PFUser *currentUser = [PFUser currentUser];
if (currentUser){
NSLog (@"CurrentUser:%@", currentUser.username);
}
else{
[self performSegueWithIdentifier:@"showLogin" sender:self];
}
self.refreshControl = [[UIRefreshControl alloc] init];
[self.refreshControl addTarget:self action:@selector(retrieveMessages) forControlEvents:UIControlEventValueChanged];
}
- (void) viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
[self.navigationController.navigationBar setHidden:NO];
[self retrieveMessages];
}
:
응용 프로그램 오류
[PFInternalUtils assertValidClassForQuery:] at PFInternalUtils.m:372
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Cannot do a comparison query for type: (null)'
*** First throw call stack:
(
0 CoreFoundation 0x032d6df6 __exceptionPreprocess + 182
1 libobjc.A.dylib 0x02f60a97 objc_exception_throw + 44
2 CoreFoundation 0x032d6d1d +[NSException raise:format:] + 141
3 0x000e60b2 +[PFInternalUtils assertValidClassForQuery:] + 324
4 0x000ce3cb -[PFQuery whereKey:equalTo:] + 91
5 0x000b7391 -[InboxViewController retrieveMessages] + 193
6 0x000b624c -[InboxViewController viewWillAppear:] + 236
7 UIKit 0x01aa614f -[UIViewController _setViewAppearState:isAnimating:] + 545
8 UIKit 0x01aa66ca -[UIViewController __viewWillAppear:] + 148
9 UIKit 0x01ad8389 -[UINavigationController _startTransition:fromViewController:toViewController:] + 931
10 UIKit 0x01ad8fdb -[UINavigationController _startDeferredTransitionIfNeeded:] + 669
11 UIKit 0x01ad9c52 -[UINavigationController __viewWillLayoutSubviews] + 57
12 UIKit 0x01c4bebc -[UILayoutContainerView layoutSubviews] + 213
13 UIKit 0x019d59c0 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 608
14 libobjc.A.dylib 0x02f76771 -[NSObject performSelector:withObject:] + 70
15 QuartzCore 0x00c9827f -[CALayer layoutSublayers] + 152
16 QuartzCore 0x00c8c105 _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 397
17 QuartzCore 0x00c8bf60 _ZN2CA5Layer28layout_and_display_if_neededEPNS_11TransactionE + 26
18 QuartzCore 0x00bea676 _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 284
19 QuartzCore 0x00beba3c _ZN2CA11Transaction6commitEv + 392
20 QuartzCore 0x00cb1789 +[CATransaction flush] + 52
21 UIKit 0x019487e6 -[UIApplication _reportMainSceneUpdateFinished:] + 39
22 UIKit 0x01949761 -[UIApplication _runWithMainScene:transitionContext:completion:] + 3163
23 UIKit 0x01961d30 __84-[UIApplication _handleApplicationActivationWithScene:transitionContext:completion:]_block_invoke + 59
24 UIKit 0x01947d7f -[UIApplication workspaceDidEndTransaction:] + 155
25 FrontBoardServices 0x064069de __37-[FBSWorkspace clientEndTransaction:]_block_invoke_2 + 71
26 FrontBoardServices 0x0640646f __40-[FBSWorkspace _performDelegateCallOut:]_block_invoke + 54
27 FrontBoardServices 0x06418425 __31-[FBSSerialQueue performAsync:]_block_invoke + 26
28 CoreFoundation 0x031fa7a0 __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 16
29 CoreFoundation 0x031f00b3 __CFRunLoopDoBlocks + 195
30 CoreFoundation 0x031eff0b __CFRunLoopRun + 2715
31 CoreFoundation 0x031ef1ab CFRunLoopRunSpecific + 443
32 CoreFoundation 0x031eefdb CFRunLoopRunInMode + 123
33 UIKit 0x01947744 -[UIApplication _run] + 571
34 UIKit 0x0194ae16 UIApplicationMain + 1526
35 0x000b567d main + 141
36 libdyld.dylib 0x04dddac9 start + 1
37 ??? 0x00000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
편집과 충돌합니다.
업데이트하기 전에 정상적으로 작동했습니다.
이 오류를 해결하는 방법을 알려주세요.
도움 주셔서 감사합니다.
코드를 알려주시겠습니까? 또한 예외가 발생했습니다 :'NSInvalidArgumentException ', 이유 :'타입에 대한 비교 질의를 할 수 없습니다 : (null)'? – cybermonkey
모든 인스턴트 메시지는 CoreFoundation + + [NSException raise : format :] – user1120133
입니다 ** 귀하의 질문에 ** 전체 오류 로그 **를 붙여 넣으십시오 (예 : http://stackoverflow.com/questions/3847798/terminate-called- after-throwing-an-instance-of-nsexception-error-xcode)를 사용합니다. – cybermonkey