新しい FacebookSdk を使用していますが、iOS 6.0 で実行するとアプリがクラッシュします。クラッシュ ログは次のとおりです。
*** Assertion failure in -[FBSession close], /Users/jacl/src/release/ios-sdk/src/FBSession.m:404
2012-12-12 12:48:49.993 localfave[1406:1d903] uncaughtExceptionHnadler -- Exception FBSession: should only be used from a single thread
2012-12-12 12:48:49.996 test[1406:1d903] Stack trace: (
0 CoreFoundation 0x02d6b02e __exceptionPreprocess + 206
1 libobjc.A.dylib 0x01cd6e7e objc_exception_throw + 44
2 CoreFoundation 0x02d6ae78 +[NSException raise:format:arguments:] + 136
3 Foundation 0x0176cf35 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 116
4 localfave 0x000f6e1d -[FBSession close] + 177
5 localfave 0x000f753e +[FBSession setActiveSession:] + 50
6 localfave 0x000fa6ee +[FBSession openActiveSessionWithPermissions:allowLoginUI:allowSystemAccount:isRead:defaultAudience:completionHandler:] + 230
7 test 0x000f7408 +[FBSession openActiveSessionWithReadPermissions:allowLoginUI:completionHandler:] + 82
8 test 0x00002fc6 -[AppDelegate openSessionWithAllowLoginUI:] + 166
9 test 0x0008adc5 -[FacebookLoginViewController registerFacebook:] + 165
10 libobjc.A.dylib 0x01cea705 -[NSObject performSelector:withObject:withObject:] + 77
11 UIKit 0x00c21920 -[UIApplication sendAction:to:from:forEvent:] + 96
12 UIKit 0x00c218b8 -[UIApplication sendAction:toTarget:fromSender:forEvent:] + 61
13 UIKit 0x00ce2671 -[UIControl sendAction:to:forEvent:] + 66
14 UIKit 0x00ce2bcf -[UIControl(Internal) _sendActionsForEvents:withEvent:] + 578
15 UIKit 0x00ce1d38 -[UIControl touchesEnded:withEvent:] + 546
16 UIKit 0x00c5133f -[UIWindow _sendTouchesForEvent:] + 846
17 UIKit 0x00c51552 -[UIWindow sendEvent:] + 273
18 UIKit 0x00c2f3aa -[UIApplication sendEvent:] + 436
19 UIKit 0x00c20cf8 _UIApplicationHandleEvent + 9874
20 GraphicsServices 0x03057df9 _PurpleEventCallback + 339
21 GraphicsServices 0x03057ad0 PurpleEventCallback + 46
22 CoreFoundation 0x02ce0bf5 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 53
23 CoreFoundation 0x02ce0962 __CFRunLoopDoSource1 + 146
24 CoreFoundation 0x02d11bb6 __CFRunLoopRun + 2118
25 CoreFoundation 0x02d10f44 CFRunLoopRunSpecific + 276
26 CoreFoundation 0x02d10e1b CFRunLoopRunInMode + 123
27 GraphicsServices 0x030567e3 GSEventRunModal + 88
28 GraphicsServices 0x03056668 GSEventRun + 104
29 UIKit 0x00c1e65c UIApplicationMain + 1211
30 test 0x00002545 main + 213
31 test 0x00002425 start + 53
)
コードは
/*
* Opens a Facebook session and optionally shows the login UX.
*/
- (BOOL)openSessionWithAllowLoginUI:(BOOL)allowLoginUI {
return [FBSession openActiveSessionWithReadPermissions:nil
allowLoginUI:allowLoginUI
completionHandler:^(FBSession *session,
FBSessionState state,
NSError *error) {
[self sessionStateChanged:session
state:state
error:error];
}];
}
/*
* Callback for session changes.
*/
助けてください!