Open newuser44 opened 4 years ago
What is the proper way to add this plugin?
I finally got my app to build on ios. But this plugin is not installed. I read on another website to add this plugin into the package.json and it would get added. Is that correct?
What is the correct way to add the branch cordova sdk plugin to a project?
I iOS is installed and able to get the app build with the branch plugin removed.
Build is happy.
trying to add branch-cordova-sdk -- adding it directly to config.xml causes error above.
Trying to add it on command line, not much different.
710:control W437982$ ionic cordova plugin add branch-cordova-sdk
> cordova plugin add branch-cordova-sdk
Plugin "branch-cordova-sdk" already installed on browser.
Installing "branch-cordova-sdk" for ios
Unable to load PlatformApi from platform. Error: Cannot find module 'unorm'
Failed to install 'branch-cordova-sdk': Error: Unhandled "error" event. (The platform "ios" does not appear to be a valid cordova platform. It is missing API.js. ios not supported.)
at EventEmitter.emit (events.js:186:19)
plugins folder does have a branch-cordovan-sdk folder, not sure if its complete.
package.json does have the plugin in the list.
"branch-cordova-sdk": "^4.1.3",
Nothing in config.xml.
At this point I don't know why to do? I'm in some mixed state.
Trying to build right after fails.
> ionic-app-scripts build --target cordova --platform ios --buildFlag=-UseModernBuildSystem=0
module.js:549
throw err;
^
Error: Cannot find module 'graceful-fs'
at Function.Module._resolveFilename (module.js:547:15)
at Function.Module._load (module.js:474:25)
Leaving the plugin out there and re-install node modules. Leaving iOS installed to (it already has plugins set up).
Build works (no errors). Plugin does not show up in config.xml. Hard to know if this are set up.
Lets try ionic cordova prepare
Nothing new with that command, but did notice the following two lines.
deeplinks started ... deeplinks finished in 132 ms
I guess that is good?
Did you run pod repo update
before to update your local cocoapod repos?
I had this error when installing branch-cordova-sdk before running pod repo update
:
Failed to install 'branch-cordova-sdk': Error: pod: Command failed with exit code 31
at ChildProcess.whenDone (/Users/geraldstockinger/git/ticketgretchen-ionic/cordova/tgapp/node_modules/cordova-common/src/superspawn.js:136:25)
at ChildProcess.emit (events.js:315:20)
at maybeClose (internal/child_process.js:1021:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
Updating the the pod repo fixed it!
Hey @newuser44 Can you provide additional information about your build environment? Cordova version, branch-cordova-sdk version, node/npm versions, installed plugins.
What is the proper way to add this plugin?
Please refer to https://help.branch.io/developers-hub/docs/cordova-phonegap-ionic#configure-app for configuration steps.
Have an ionic 3 app.
Recently updated Mac to Catalina.
Trying to install plugin.
Have tried running command to add it. Here I have it in the config.xml to add it in the install.
Any idea how to fix this?