Skip to content

Commit 4564d72

Browse files
Merge pull request #10 from tgpetrov/patch-1
add info about running the demo
2 parents e949839 + 6dcc707 commit 4564d72

File tree

1 file changed

+18
-6
lines changed

1 file changed

+18
-6
lines changed

README.md

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -93,11 +93,11 @@ Create an app *for each platform you target*. That way you can roll out release
9393
> ⚠️ The `appname` must be unique, and should not contain dashes (`-`).
9494
9595
```shell
96-
nativescript-code-push app add <appname> <platform>
96+
nativescript-code-push app add <appname> <platform> nativescript
9797

9898
# examples:
99-
nativescript-code-push app add MyAppIOS ios
100-
nativescript-code-push app add MyAppAndroid android
99+
nativescript-code-push app add MyAppIOS ios nativescript
100+
nativescript-code-push app add MyAppAndroid android nativescript
101101
```
102102

103103
> 💁‍♂️ This will show you your deployment keys you'll need when connecting to the CodePush server. If you want to list those keys at any later time, use `nativescript-code-push deployment ls <appName> --displayKeys`.
@@ -319,9 +319,9 @@ Which produces something like this:
319319
|Label|Release Time|App Version|Mandatory|Description|Install Metrics
320320
|---|---|---|---|---|---
321321
|v2|an hour ago|1.0.0|Yes|Mandatory iOS version!|Active: 11% (2 of 19)
322-
|||||Total: 2|
322+
||||||Total: 2|
323323
|v1|2 hours ago|1.0.0|No|Awesome iOS version!|Active: 26% (5 of 19)
324-
|||||Total: 5|
324+
||||||Total: 5|
325325

326326
### Give me the details of the current release!
327327
This dumps the details of the most recent release for both the Staging and Production environments of your app:
@@ -364,6 +364,18 @@ Perform these steps once you've pushed an update and added the `sync` command to
364364
- `$ tns run <platform>`. On an iOS *device* add the `--release` flag so LiveSync doesn't interfere.
365365
- kill and restart the app after the update is installed
366366

367+
### Running the demo app
368+
You may also play with CodePush by using its demo app. Here are the steps you need to perform in order to observe an app update:
369+
- register with the service (`nativescript-code-push register`) and add the demo app to your account (`nativescript-code-push app add <appname> <platform> nativescript`)
370+
- once the app is registered you will see its deployment keys in the console, use them to update the ones in the [demo](https://github.com/EddyVerbruggen/nativescript-code-push/blob/master/demo/demoapp/main-view-model.ts)
371+
- go to src and run `npm run preparedemo` - this will build the plugin and add a reference to the demo app
372+
- prepare an app that will be used as an "update version" (for example, uncomment one of the CODEPUSH labels and comment the APPSTORE label), then run `tns build <platform>`
373+
- release the update (`nativescript-code-push release <appname> <platform>`)
374+
- you can ensure it appears in the list with updates (`nativescript-code-push deployment history <appname> Staging`)
375+
- prepare an app that will be used as an "official release version" (for example, comment the CODEPUSH label and uncomment the APPSTORE label), then run `tns run <platform>`
376+
- when the app is deployed on the device, you should see the "official release version" along with information about an installed update
377+
- close the app (and remove it from device's recent apps to ensure its next start will be a cold start) and run it again - you should now see the "update version" of the app
378+
367379
### Patching Update Metadata
368380
After releasing an update, there may be scenarios where you need to modify one or more of the metadata attributes associated with it
369381
(e.g. you forgot to mark a critical bug fix as mandatory.
@@ -536,4 +548,4 @@ Once you've logged in, any inferred and/or specified proxy settings are persiste
536548
This allows you to continue using the CLI without needing to re-authenticate or re-specify your preferred proxy.
537549
If at any time you want to start or stop using a proxy, simply logout, and then log back in with the newly desired settings.
538550

539-
</details>
551+
</details>

0 commit comments

Comments
 (0)