![](/img/trans.png)
[英]React Native Facebook login button crashes app in iOS Simulator
[英]Expo react native Facebook login crashes on iOS standalone app
Facebook 登录在 iOS 独立应用程序上崩溃,但在本地 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
世博会脸书
"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>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.