我正在尝试使本机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
最佳答案
我认为您错过了将这些内容添加到应用程序的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>
关于ios - React Native FBSDK无法识别的选择器发送到实例,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/41374955/