我正在尝试使反应的FBSDK工作。具有讽刺意味的是,相同的代码以前没有任何更改(我什至都具有登录工作的屏幕记录),但是由于重新启动Xcode和Simulator,我会在应用程序开始时收到此崩溃。
我仔细检查以确保我正确遵循安装步骤。我还用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
对我来说,因为我正在使用cocoapods链接,删除手动链接解决了问题。
也就是说,转到Xcode>项目root>建立阶段>链接二进制文件与库,然后删除Facebook Core/登录等。
我认为您错过了在应用程序的信息中添加这些内容。
<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>