|
| 1 | +--- |
| 2 | +title: Publishing with ns publish |
| 3 | +category: Publishing |
| 4 | +categoryLink: /guide/publishing/ |
| 5 | +prev: /guide/publishing/ |
| 6 | +next: false |
| 7 | +contributors: |
| 8 | + - rigor789 |
| 9 | + - NathanWalker |
| 10 | +breadcrumbs: |
| 11 | + - name: 'Publishing' |
| 12 | + href: '/guide/publishing/' |
| 13 | + - name: 'Using ns publish' |
| 14 | +--- |
| 15 | + |
| 16 | +You may want to review a few specific store preparation details in the following before using `ns publish`: |
| 17 | +- [Publishing to Google Play](/guide/publishing/android-google-play) |
| 18 | +- [Publishing to Apple App Store](/guide/publishing/apple-app-store) |
| 19 | + |
| 20 | +You can execute the following command inside a NativeScript project using the CLI: |
| 21 | + |
| 22 | +```bash |
| 23 | +ns publish ios |
| 24 | +``` |
| 25 | + |
| 26 | +The command will prompt for your `Apple ID` and `Password` for authentication with [iTunes Connect](https://itunesconnect.apple.com) and then produce a `release` build and proceed to upload it to iTunes Connect. |
| 27 | + |
| 28 | +Alternatively, you can use an existing build by running the following command: |
| 29 | + |
| 30 | +```bash |
| 31 | +ns publish ios --ipa <path-to-ipa> |
| 32 | +``` |
| 33 | + |
| 34 | +All of the parameters needed for publishing can be passed to the `publish` command directly: |
| 35 | + |
| 36 | +```bash |
| 37 | +ns publish ios [<Apple ID> [<Password> [<Mobile Provisioning Profile Identifier> [<Code Sign Identity>]]]]] |
| 38 | +``` |
| 39 | +
|
| 40 | +For example, assuming that you want to issue a build using a mobile provision with an identifier _d5d40f61-b303-4fc8-aea3-fbb229a8171c_, you could run: |
| 41 | +
|
| 42 | +```bash |
| 43 | +ns publish ios my-apple-id my-password d5d40f61-b303-4fc8-aea3-fbb229a8171c "iPhone Distribution" |
| 44 | +``` |
| 45 | +
|
| 46 | +Note that the `Code Sign Identity` can be set to something generic like _iPhone Distribution_ in order to let the build automatically detect a code sign identity. |
| 47 | +
|
| 48 | +You can also automate the uploads of already built packages: |
| 49 | +
|
| 50 | +```bash |
| 51 | +ns publish ios my-apple-id my-password --ipa /tmp/build/myIpa.ipa |
| 52 | +``` |
| 53 | +
|
| 54 | +For more information, run the following command: |
| 55 | +
|
| 56 | +```bash |
| 57 | +ns help publish ios |
| 58 | +``` |
| 59 | +
|
| 60 | +Some tools that allow the submission process to be automated: |
| 61 | +
|
| 62 | +- https://blog.nativescript.org/automatic-nativescript-app-deployments-with-fastlane/ |
| 63 | +- https://github.com/fastlane/fastlane |
0 commit comments