jeduan / cordova-plugin-facebook4

Use the latest Facebook SDK in your Cordova and Ionic projects
Other
767 stars 511 forks source link

Ionic 4 (XCode 10.3) - App ID not found. Add a string value with your app ID... #850

Closed ehdez82 closed 4 years ago

ehdez82 commented 4 years ago

Greetings. I am using Ionic 4 and I have the following error which was reviewed in issue #817 :

App ID not found. Add a string value with your app ID for the key FacebookAppID to the Info.plist or call [FBSDKSettings setAppID:].

This issue was closed due to a conflict with the cordova-plugin-firebasex, however in my project I am not using the cordova-plugin-firebasex. Apparently the info.plist file is not being updated correctly. In my package.json file the variables APP_ID and APP_NAME are defined correctly.

I have tried the following solutions:

  1. Uninstall and install the plugin several times without any success.

ionic cordova plugin add cordova-plugin-facebook4 --variable APP_ID="12345678" --variable APP_NAME="app-name"

  1. Manually edit the info.plist in XCode by setting the FacebookAppID key with the app id, which gives this error:

'InvalidOperationException', reason: 'fb12345678 is not registered as a URL scheme. Please add it in your Info.plist'

Ionic information

Ionic:

Ionic CLI : 5.4.16 (/usr/local/lib/node_modules/ionic) Ionic Framework : @ionic/angular 4.9.1 @angular-devkit/build-angular : 0.801.3 @angular-devkit/schematics : 8.1.3 @angular/cli : 8.1.3 @ionic/angular-toolkit : 2.0.0

Cordova:

Cordova CLI : 9.0.0 (cordova-lib@9.0.1) Cordova Platforms : ios 5.1.1 Cordova Plugins : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 4.1.2, (and 24 other plugins)

Utility:

cordova-res (update available: 0.9.0) : 0.6.0 native-run : 0.3.0

System:

ios-deploy : 1.9.4 ios-sim : 8.0.2 NodeJS : v12.10.0 (/usr/local/Cellar/node/12.10.0/bin/node) npm : 6.11.3 OS : macOS Mojave Xcode : Xcode 10.3 Build version 10G8

Cordova plugins:

call-number 0.0.2 "Cordova Call Number Plugin" com-badrit-base64 0.2.0 "Base64" cordova-clipboard 1.3.0 "Clipboard" cordova-plugin-app-version 0.1.9 "AppVersion" cordova-plugin-appminimize 1.0.1 "AppMinimize" cordova-plugin-apprate 1.4.0 "AppRate" cordova-plugin-camera 4.1.0 "Camera" cordova-plugin-device 2.0.2 "Device" cordova-plugin-dialogs 2.0.2 "Notification" cordova-plugin-facebook4 6.2.0 "Facebook Connect" cordova-plugin-fcm-with-dependecy-updated 4.1.1 "Cordova FCM Push Plugin" cordova-plugin-file 6.0.2 "File" cordova-plugin-geolocation 4.0.2 "Geolocation" cordova-plugin-globalization 1.11.0 "Globalization" cordova-plugin-googlemaps 2.6.2 "cordova-plugin-googlemaps" cordova-plugin-googleplus 8.2.1 "Google SignIn" cordova-plugin-inappbrowser 3.1.0 "InAppBrowser" cordova-plugin-ionic-keyboard 2.2.0 "cordova-plugin-ionic-keyboard" cordova-plugin-ionic-webview 4.1.2 "cordova-plugin-ionic-webview" cordova-plugin-mediapicker-dmcsdk 2.4.7 "MediaPicker" cordova-plugin-nativestorage 2.3.2 "NativeStorage" cordova-plugin-network-information 2.0.2 "Network Information" cordova-plugin-request-location-accuracy 2.3.0 "Request Location Accuracy" cordova-plugin-screen-orientation 3.0.2 "Screen Orientation" cordova-plugin-splashscreen 5.0.2 "Splashscreen" cordova-plugin-statusbar 2.4.2 "StatusBar" cordova-plugin-vibration 3.1.1 "Vibration" cordova-plugin-whitelist 1.3.3 "Whitelist" cordova-sqlite-storage 3.4.0 "Cordova sqlite storage plugin - cordova-sqlite-storage plugin version" cordova.plugins.diagnostic 5.0.1 "Diagnostic"

I appreciate any help with this error. Thanks in advance.

peterpeterparker commented 4 years ago

Plz use other channels for support requests.

However if you do think that your issue is a bug, plz provide sample repo to reproduce the problem.

If you can't provide your project you could for example use the new sample repo to try to reproduce the issue.

I'll reopen the issue if so.

pghoratiu commented 4 years ago

I experience the same in a similar setup. Looks like the entire configuration setup from plugin.xml which updates *-Info.plist is not executed.

Yuripetusko commented 4 years ago

I get the same error when installing latest version of the plugin 6.4.0

Terminating app due to uncaught exception 'InvalidOperationException', reason: 'fbXXXXX is not registered as a URL scheme. Please add it in your Info.plist'

ryaa commented 4 years ago

This comment might help to resolve this problem https://github.com/jeduan/cordova-plugin-facebook4/issues/817#issuecomment-625841097