Skip to content

Commit 25095be

Browse files
Bumped the CLI dependency and fixed there readme here and there
1 parent 5e4ae2b commit 25095be

File tree

5 files changed

+20
-2242
lines changed

5 files changed

+20
-2242
lines changed

README.md

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,15 +47,14 @@ So as long as you don't change versions of dependencies and tns platforms in you
4747
can push happily. And if you do bump a version of a dependency make sure there are no changed platform libraries.
4848

4949
## Getting Started
50-
> ⚠️ TODO test this workflow!
5150

5251
#### Globally install the NativeScript CodePush CLI
5352

5453
```shell
5554
npm i -g nativescript-code-push-cli
5655
```
5756

58-
> 💁‍♂️ This will also add the global `nativescript-code-push` command to your machine.
57+
> 💁‍♂️ This will also add the global `nativescript-code-push` command to your machine. You can check the currently installed version with `nativescript-code-push -v`.
5958
6059
#### Login or register with the service
6160

@@ -71,10 +70,21 @@ Register if you don't have an account yet:
7170
nativescript-code-push register
7271
```
7372

73+
This will open a browser where you can provide your credentials, after which you can create an access key that
74+
you can paste in the console.
75+
76+
You should now have a `.nativescript-code-push.config` file in your home folder which will automatically
77+
authenticate you with the server from now on.
78+
79+
> Note that you _could_ use a that web interface for managing you apps, but the CLI is much more sophisticated, so it's recommended to use the command line interface.
80+
7481
#### Register your app with the service
7582
Create an app for each OS you target:
7683

7784
```shell
85+
nativescript-code-push app add <app-name-you-can-easily-identify> <platform> nativescript
86+
87+
# examples:
7888
nativescript-code-push app add MyApp-IOS ios nativescript
7989
nativescript-code-push app add MyApp-Android android nativescript
8090
```
@@ -93,7 +103,7 @@ nativescript-code-push app ls
93103
tns plugin add nativescript-code-push
94104
```
95105

96-
> ⚠️ If you're restricting access to the internet from within your app, make sure you whitelist `https://nativescript-codepush-server.herokuapp.com`.
106+
> ⚠️ If you're restricting access to the internet from within your app, make sure you whitelist the `serverUrl` (`https://nativescript-codepush-server.herokuapp.com` by default) and file server (`https://s3.eu-west-1.amazonaws.com`).
97107
98108
## Checking for updates
99109
With the CodePush plugin installed and configured, the only thing left is to add the necessary code to your app to control when it checks for updates.

demo/demoapp/main-page.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<Page xmlns="http://schemas.nativescript.org/tns.xsd" loaded="pageLoaded" class="page">
22
<StackLayout class="p-20">
33

4-
<!-- you can toggle these labels when building/releasing -->
5-
<!-- <Label text="I'm CODEPUSH iOS version v7 (mandatory)" class="t-20 text-center c-orange" textWrap="true"/>-->
4+
<!-- <Label text="I'm CODEPUSH iOS v2" class="t-20 text-center c-orange" textWrap="true"/>-->
5+
<!-- <Label text="I'm CODEPUSH Android v2 (mandatory)" class="t-20 text-center c-orange" textWrap="true"/>-->
66
<Label text="I'm the APPSTORE version" class="t-20 text-center c-orange" textWrap="true"/>
77

88
<Label text="{{ message }}" class="t-20 m-30 text-center c-black" textWrap="true"/>

demo/package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
}
1010
},
1111
"scripts": {
12+
"codepush.register": "nativescript-code-push register",
13+
"codepush.login": "nativescript-code-push login",
1214
"codepush.list-apps": "nativescript-code-push app ls",
1315
"codepush.android.stats": "nativescript-code-push deployment ls CodePushDemo-Android --displayKeys",
1416
"codepush.ios.stats": "nativescript-code-push deployment ls CodePushDemoIOS --displayKeys",
@@ -17,7 +19,8 @@
1719
"codepush.ios": "nativescript-code-push release-nativescript CodePushDemoIOS ios --description 'Awesome iOS version!'",
1820
"codepush.ios.mandatory": "nativescript-code-push release-nativescript CodePushDemoIOS ios --mandatory --description 'Mandatory iOS version!'",
1921
"codepush.ios.buildrelease": "nativescript-code-push release-nativescript CodePushDemoIOS ios --build --isReleaseBuildType",
20-
"codepush.android": "nativescript-code-push release-nativescript CodePushDemo-Android android --description 'Awesome Android version!' --targetBinaryVersion 2.0.0",
22+
"codepush.android": "nativescript-code-push release-nativescript CodePushDemo-Android android --description 'Awesome Android version!'",
23+
"codepush.android.mandatory": "nativescript-code-push release-nativescript CodePushDemo-Android android --mandatory --description 'Awesome Android version!'",
2124
"codepush.android.v2": "nativescript-code-push release-nativescript CodePushDemo-Android android --description 'Awesome Android version!' --targetBinaryVersion 2.0.0",
2225
"codepush.android.release": "nativescript-code-push release-nativescript CodePushDemo-Android android -deploymentName Staging --build --isReleaseBuildType --keystorePath \"/Users/eddyverbruggen/Desktop/werkmap/Android dev X-Services/xservices.keystore\" --keystorePassword YOUR_PASSWORD --keystoreAlias xservices --keystoreAliasPassword YOUR_PASSWORD",
2326
"codepush.ios.rollback": "nativescript-code-push rollback CodePushDemoIOS Staging",

0 commit comments

Comments
 (0)