简体   繁体   中英

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]

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 (eg 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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM