You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by GitBox <gi...@apache.org> on 2018/12/24 05:39:08 UTC

[GitHub] knight9999 opened a new pull request #487: Fix issue #486. Distinguish xcodebuild `build` command and `archive` command.

knight9999 opened a new pull request #487: Fix issue #486. Distinguish xcodebuild `build` command and `archive` command.
URL: https://github.com/apache/cordova-ios/pull/487
 
 
   distinguish `xcodebuild build` and `xcodebuild archive` according to `cordova build` and `cordova run`
   
   ### Platforms affected
   cordova-ios 
   
   ### What does this PR do?
   Resolve this the #486
   
   1. removing `shelljs` in cordova/lib/run.js.  This is because `shelljs.rm` can not remove symbolic link.
   2. using `xcodebuild build` at `cordova run --device`. Because `ios-deploy` can not work normally with `.app` pacakge obtained by`xcodebuild archive` and `xcodebuild -exportArchive` command.  
   3. new option `--nobuild-device` is added. This is force skip build process evenwhen `cordova run --device`.
   
   In this PR, `build.js` is called from `run.js` with the build-action `build`. This is because we should use internal `xcodebuild build` command to get the `.app` package instead of `xcodebuild archive` command with Xcode 10. 
    
   Although this PR works with the latest cordova-lib, the unnecessary build process runs.
   To remove unnecessary build process, we should update `cordova-lib`. I will send new PR about this for cordova-lib.
   
   ### What testing has been done on this change?
   I checked as follows with both Xcode9 and Xcode10 envrionment.
   
   ```
   $ npx cordova@nightly create xcode10Test com.foo.bar
   $ cd xcode10Test
   $ vi build.json
   (set the certificate and provisioning file, development for debug build and ad-hoc for release build)
   $ npx cordova@nightly platform add github:knight9999/cordova-ios#fix_cordova_run
   $ npx cordova@nightly run --emulator --debug 
   (In some environment, you should specify the target like
   `--target="iPhone-8, 11.4"`. This is because the selecting default simulator logic is different between build.js and run.js. This is another issue we should solve. but is out of this PR.) 
   (confirm on emulator)
   $ npx cordova@nightly run --device --debug
   (confirm on device)
   $ npx cordova@nightly run --device --release
   (confirm on device)
   $ npx cordova@nightly run --device --nobuild --nobuild-device
   (confirm on device)
   $ npx cordova@nightly build --device
   (install .ipa file and confirm on device)
   $ npx cordova@nightly build --release
   (install .ipa file and confirm on device)
   ```
   
   ### Checklist
   - [ ] [Reported an issue](http://cordova.apache.org/contribute/issues.html) in the JIRA database
   - [ ] Commit message follows the format: "CB-3232: (android) Fix bug with resolving file paths", where CB-xxxx is the JIRA ID & "android" is the platform affected.
   - [x] Added automated test coverage as appropriate for this change.
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org