Hello,
I'm trying to create a plugin that uses the cordova facebook sdk (https://www.npmjs.com/package/cordova-plugin-fbsdk-patch).
I declare the repository in the extensibily configurations
{ "plugin": { "url":"https://github.com/MaximBelov/cordova-plugin-fbsdk" }}
and created the JS functions that calls the methods. But when I try to consume in another application, I can't generate the new version. I will attach the full log, but what caught my attention were the following lines:
[2024-09-19T02:17:07.762Z] [VERBOSE] [Build] Running command: npm install https://github.com/MaximBelov/cordova-plugin-fbsdk --save-exact
[2024-09-19T02:17:09.774Z] [VERBOSE] [Build] Command finished with error code 0: npm install,https://github.com/MaximBelov/cordova-plugin-fbsdk,--save-exact
[2024-09-19T02:17:09.780Z] [VERBOSE] [Build] Copying plugin "source/node_modules/cordova-plugin-fbsdk" => "source/plugins/cordova-plugin-fbsdk"
[2024-09-19T02:17:09.803Z] [VERBOSE] [Build] Removing source/plugins/cordova-plugin-fbsdk because mandatory plugin variables were missing.
[2024-09-19T02:17:09.809Z] [VERBOSE] [Build] Variable(s) missing (use: --variable APP_ID=value --variable CLIENT_TOKEN=value --variable APP_NAME=value).
[2024-09-19T02:17:09.809Z] [VERBOSE] [Build] CordovaError: Variable(s) missing (use: --variable APP_ID=value --variable CLIENT_TOKEN=value --variable APP_NAME=value).
The error on install is happening because the missing variables? If yes, how can I declare them?
Hi @Victor Abreu,
As per the error point view after extensibily configurations
You have to call the java script for
Set Application ID and Name
By default, the APP_ID and APP_NAME provided when the plugin is added are used. If you instead need to set the application ID and name in code, you can do so. (You must still include an APP_ID and APP_NAME when adding the plugin, as the values are required for the Android manifest and *-Info.plist files.)
facebookConnectPlugin.setApplicationId(String id, Function success)
Success function indicates the application ID has been updated.
facebookConnectPlugin.setApplicationName(String name, Function success)
Success function indicates the application name has been updated.
Note that in order to dynamically switch between multiple app IDs on iOS, you must use the OTHER_APP_SCHEMES variable and specify each additional app ID you will use with setApplicationId separated by a comma, e.g.
Till you are facing an issue please share oml file so that make the correction and send to you.
Hello @rammurthynaidu boddu,
Thanks for reply. I read this part of documentation when I start the development, but how can I execute this script before the instalation of the plugin in other application?
I found this documentation, and it propabily solve the problem:
https://success.outsystems.com/documentation/11/deploying_apps/mobile_apps_packaging_and_delivery/customize_your_mobile_app/extensibility_configurations_json_schema/