Archimedes Trajano
Archimedes Trajano

Reputation: 41240

When doing Cordova builds for multiple platforms, should Cordova add platform be done on the specific platform and not checked in?

Since our development occurs on both macOS because it is required by iOS and on Windows for those that are not doing iOS development normally and Linux for the CI servers (except for the one that is building for iOS). Should Cordova platform add only be done locally and not checked in?

I was wondering because if I add the Xcode platform it tries to download it on Windows and Linux. Not sure if it will have issues.

Maybe I should just avoid npx cordova build and instead just limit to npx cordova build [platform]

Upvotes: 0

Views: 83

Answers (1)

DaveAlden
DaveAlden

Reputation: 30356

Tracking any platform projects in platforms/ is not recommended in the Cordova ecosystem because those platform projects are considered volatile build artifacts so are liable to be wiped if you update the platform project (e.g. cordova platform rm ios && cordova platform add ios@latest).

If you want to build only Android on a non-OSX machine, after checking out the repo, you should run npx cordova platform add android && npx cordova build android

Upvotes: 1

Related Questions