Expo react原生Facebook登录在iOS独立应用程序上崩溃



Facebook登录在iOS独立应用程序上崩溃,但在本地Expo上运行良好。我在网上尝试了很多东西,但似乎都不起作用。

我的expo诊断。

expo: ^42.0.0 => 42.0.1
react: 16.13.1 => 16.13.1
react-dom: 16.13.1 => 16.13.1
react-native: 0.63.4 => 0.63.4
react-native-web: ~0.13.12 => 0.13.18
react-navigation: ^4.4.3 => 4.4.4
Expo Workflow: bare

世博会Facebook

"expo facebook":"11.3.1";

下面是我得到的错误。

FBSDKLog: *** <activateApp, FBSDKAppEvents> is not called on the main thread. This can lead to errors.

Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[__NSPlaceholderDictionary initWithObjects:forKeys:count:]: attempt to insert nil object from objects[2]'

感谢您的帮助。非常感谢。

我通过在Info.plist文件中添加以下行解决了这个问题。

<key>UIAppFonts</key>
<array>
<string>AntDesign.ttf</string>
<string>Entypo.ttf</string>
<string>EvilIcons.ttf</string>
<string>Feather.ttf</string>
<string>FontAwesome.ttf</string>
<string>FontAwesome5_Brands.ttf</string>
<string>FontAwesome5_Regular.ttf</string>
<string>FontAwesome5_Solid.ttf</string>
<string>Fontisto.ttf</string>
<string>Foundation.ttf</string>
<string>Ionicons.ttf</string>
<string>MaterialCommunityIcons.ttf</string>
<string>MaterialIcons.ttf</string>
<string>Octicons.ttf</string>
<string>Roboto_medium.ttf</string>
<string>Roboto.ttf</string>
<string>rubicon-icon-font.ttf</string>
<string>SimpleLineIcons.ttf</string>
<string>Zocial.ttf</string>
</array>
<key>NSUserTrackingUsageDescription</key>
<string>This identifier will be used to deliver personalized ads to you.</string>
<key>LSApplicationQueriesSchemes</key>
<array>
<string>fbapi</string>
<string>fbapi20130214</string>
<string>fbapi20130410</string>
<string>fbapi20130702</string>
<string>fbapi20131010</string>
<string>fbapi20131219</string>
<string>fbapi20140410</string>
<string>fbapi20140116</string>
<string>fbapi20150313</string>
<string>fbapi20150629</string>
<string>fbapi20160328</string>
<string>fbauth</string>
<string>fb-messenger-share-api</string>
<string>fbauth2</string>
<string>fbshareextension</string>
</array>

<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleURLSchemes</key>
<array>
<string>your facebookscheme id</string>
</array>
</dict>
</array>
<key>FacebookAppID</key>
<string>your facebook id</string>
<key>FacebookDisplayName</key>
<string>Your facebook display name</string>

最新更新