We are using Unity 2019.4.15f1.After upgrading to FB SDK 14.1.0 when clicking on login with facebook button the iOS app is freezing and crashing.
Original: I can see this in the logs:
Sep 21 15:29:21 iPhone MyProject(UnityFramework)[15154] <Notice>: Uncaught exception:
InvalidOperationException: fb0 is not registered as a URL scheme. Please add it in your Info.plist
(
0 CoreFoundation 0x000000019076529c 6B22DD81-3585-3BE6-BC77-BA19810EC0F2 + 627356
1 libobjc.A.dylib 0x00000001a9495744 objc_exception_throw + 60
2 FBSDKCoreKit 0x00000001056dd3bc -[FBSDKInternalUtility validateFacebookReservedURLSchemes] + 0
3 FBSDKLoginKit 0x0000000105a99624 $s13FBSDKLoginKit12LoginManagerC15logInParameters13configuration12loggingToken20authenticationMethodSDyS2SGSgAA0C13ConfigurationCSg_SSSgSStF + 372
4 FBSDKLoginKit 0x0000000105a97544 $s13FBSDKLoginKit12LoginManagerC19performBrowserLogIn33_C218275A97333B874EDDFE627110566CLL7handleryySb_s5Error_pSgtcSg_tF + 1216
5 FBSDKLoginKit 0x0000000105aa1b00 $s13FBSDKLoginKit12LoginManagerC5logIn33_C218275A97333B874EDDFE627110566CLL11permissions7handleryShyAA12FBPermissionCG_yAA0cdC6Resul
This is what we have in our info.plist
file.
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleURLSchemes</key>
<array>
<string>fb***************</string>
</array>
</dict>
</array>
We have this LSApplicationQueriesSchemes
in our info.plist
file too:
<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>fbauth2</string>
<string>fb-messenger-api20140430</string>
</array>
UPDATE: After adding fb0
to CFBundleURLSchemes
like this:
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleURLSchemes</key>
<array>
<string>fb0</string>
<string>fb***************</string>
</array>
</dict>
</array>
The app isn't crashing anymore, however it shows "Sorry, something went wrong" webpage from Facebook.
Resolution :
I finally found out that after updating the FB SDK, the FacebookSettings.asset file got corrupted and all the app IDs were gone.
I had to fix that by re-copying the FacebookSettings.asset
file and adding the app IDs again.
And I removed the fb0
entry from CFBundleURLSchemes
as it was clearly not needed and is a default value inside the FB SDK itself.
I am updating it here so that if someone else faces this problem it might help them.
Resolution :
I finally found out that after updating the FB SDK, the FacebookSettings.asset file got corrupted and all the app IDs were gone.
I had to fix that by re-copying the FacebookSettings.asset
file and adding the app IDs again.
And I removed the fb0
entry from CFBundleURLSchemes
as it was clearly not needed and is a default value inside the FB SDK itself.
I am updating it here so that if someone else faces this problem it might help them.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.