Whenever I add a new cordova package to Meteor I get "Error: Variable(s) missing: REVERSED_CLIENT_ID"

247 views Asked by At

Building an ios application from an existing Meteor package. I have been running the following in order to get the application to become an Xcode project:

meteor build ../example-output --mobile-settings settings-staging.json --server https://example-staging.meteorapp.com:443  

I already have a mobile-config.js, which includes all the typical configurations for meteor such as App.info, App.icons, App.launchScreens, App.appendToConfig. In addition, I have the REVERSED_CLIENT_ID included in the file. Everything works fine, until I add any cordova plugins (meteor add plugin cordova: etc.)

App.configurePlugin("cordova-plugin-googleplus", {
  REVERSED_CLIENT_ID: "com.googleusercontent.apps.010101010-bexamples123"
});

The application builds into a .xcworkspace but then has issues which I think these cordova plugins will fix. How can I configure/fix the REVERSED_CLIENT_ID and/or config issues and add cordova plugins so that this project can compile to an Xcode .xcworkspace?

1

There are 1 answers

0
maudulus On

Thanks to this Github post, which pointed out that

"This problem exists since 1.2.x. It sometimes happens if a Cordova package references another Cordova package as a dependency. I had this problems a lot with the cordova-plugin-compat package which is referenced by some others."

The solution ended up being to simply remove the cordova build:

rm -rf .meteor/local/cordova-build    

I also removed and added the iOS platform again for good measure:

meteor remove-platform ios                 
meteor add-platform ios