我正在努力让反应原生的FBSDK正常工作。具有讽刺意味的是,没有任何更改的相同代码以前工作(我甚至有登录工作的屏幕录制),但自从重新启动xcode和模拟器后,我在应用程序启动时收到此崩溃。
我仔细检查以确保我正确遵循安装步骤。我还用cocoapods切换了手动下载的版本但错误相同
2016-12-29 16:13:46.067 myapp[13521:2804102] Falling back to loading access token from NSUserDefaults because of simulator bug
2016-12-29 16:13:46.067 myapp[13521:2804102] -[NSConcreteMutableData isEqualToString:]: unrecognized selector sent to instance 0x610000050bc0
2016-12-29 16:13:46.076 myapp[13521:2804102] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSConcreteMutableData isEqualToString:]: unrecognized selector sent to instance 0x610000050bc0'
*** First throw call stack:
(
0 CoreFoundation 0x0000000105915d4b __exceptionPreprocess + 171
1 libobjc.A.dylib 0x000000010479921e objc_exception_throw + 48
2 CoreFoundation 0x0000000105985f04 -[NSObject(NSObject) doesNotRecognizeSelector:] + 132
3 CoreFoundation 0x000000010589b005 ___forwarding___ + 1013
4 CoreFoundation 0x000000010589ab88 _CF_forwarding_prep_0 + 120
5 FBSDKCoreKit 0x0000000103f9db1a -[FBSDKAccessTokenCacheV4 fetchAccessToken] + 202
6 FBSDKCoreKit 0x0000000103f9c0ec -[FBSDKAccessTokenCache fetchAccessToken] + 92
7 FBSDKCoreKit 0x0000000103faaded -[FBSDKApplicationDelegate application:didFinishLaunchingWithOptions:] + 125
8 songchat 0x0000000103b8c852 -[AppDelegate application:didFinishLaunchingWithOptions:] + 130
9 UIKit 0x0000000107ea13c2 -[UIApplication _handleDelegateCallbacksWithOptions:isSuspended:restoreState:] + 290
10 UIKit 0x0000000107ea2d47 -[UIApplication _callInitializationDelegatesForMainScene:transitionContext:] + 4236
11 UIKit 0x0000000107ea90ed -[UIApplication _runWithMainScene:transitionContext:completion:] + 1731
12 UIKit 0x0000000107ea626d -[UIApplication workspaceDidEndTransaction:] + 188
13 FrontBoardServices 0x000000010b56f6cb __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 24
14 FrontBoardServices 0x000000010b56f544 -[FBSSerialQueue _performNext] + 189
15 FrontBoardServices 0x000000010b56f8cd -[FBSSerialQueue _performNextFromRunLoopSource] + 45
16 CoreFoundation 0x00000001058ba761 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
17 CoreFoundation 0x000000010589f98c __CFRunLoopDoSources0 + 556
18 CoreFoundation 0x000000010589ee76 __CFRunLoopRun + 918
19 CoreFoundation 0x000000010589e884 CFRunLoopRunSpecific + 420
20 UIKit 0x0000000107ea4aea -[UIApplication _run] + 434
21 UIKit 0x0000000107eaac68 UIApplicationMain + 159
22 songchat 0x0000000103b8ce8f main + 111
23 libdyld.dylib 0x0000000109e0f68d start + 1
24 ??? 0x0000000000000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
答案 0 :(得分:0)
我认为您错过了在应用的Info.plist中添加这些内容。
<key>FacebookAppID</key>
<string>Your_App_ID</string>
<key>FacebookDisplayName</key>
<string>Your_App_Display_Name</string>
<key>LSApplicationQueriesSchemes</key>
<array>
<string>fbapi</string>
<string>fb-messenger-share-api</string>
<string>fbauth2</string>
<string>fbshareextension</string>
</array>