Skip to content

Commit 188a16e

Browse files
improved readme.md
improved readme.md
1 parent fe767bf commit 188a16e

File tree

1 file changed

+14
-6
lines changed

1 file changed

+14
-6
lines changed

README.md

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# cordova-code-push + Ionic example
22

3+
Example of how to set up a basic Ionic APP with the code-push cordova plugin.
4+
35
## Prepare the Ionic APP
46

57
`ionic start codepush-ionic-test blank`
@@ -22,17 +24,21 @@
2224

2325
`code-push login`
2426

27+
> This command will open the browser and you will have to create an account with the code-push cloud services (you can use your Github, Google, Hotmail one). After successful sign-up, you must copy the token provided by the browser in the terminal.
28+
2529
`code-push app add codepush-ionic-test-ios ios cordova`
2630

2731
`code-push app add codepush-ionic-test-android android cordova`
2832

29-
**See again the keys:**
33+
> It's better to add two different apps in your code-push account for each platform so you can handle them separately.
34+
35+
**See again the deployment keys:**
3036

3137
`code-push deployment ls codepush-ionic-test-android -k`
3238

3339
`code-push deployment ls codepush-ionic-test-ios -k`
3440

35-
**config.xml**:
41+
Now set up these keys in your **config.xml**:
3642
```xml
3743
<platform name="android">
3844
<preference name="CodePushDeploymentKey" value="YOUR-ANDROID-DEPLOYMENT-KEY" />
@@ -42,7 +48,7 @@
4248
</platform>
4349
```
4450

45-
**src/app/app.module.ts** (set `CodePush` as provider):
51+
Modify **src/app/app.module.ts** (to set `CodePush` as provider):
4652

4753
```typescript
4854
import { BrowserModule } from '@angular/platform-browser';
@@ -81,7 +87,7 @@ export class AppModule {}
8187

8288
```
8389

84-
**src/app.component.ts** (alert for **updates**):
90+
Finally, use the plugin! Modify **src/app.component.ts** (alert for **updates**):
8591

8692
```typescript
8793
import { Component } from '@angular/core';
@@ -134,7 +140,9 @@ export class MyApp {
134140
}
135141
```
136142

137-
## Release the update
143+
Now, you should build your app and test it in your emulator/physical device. You will be only building it once, and then releasing the updates throw code-push.
144+
145+
## Release the updates
138146

139147
Modify anything in your app and...
140148

@@ -146,4 +154,4 @@ Modify anything in your app and...
146154

147155
`code-push release codepush-ionic-test-android ./platforms/android/assets/www/ 0.0.1 --description "Your awesome change description"`
148156

149-
> **Note**: the update will only be released for those devices matching the 0.0.1 version of your app.
157+
> **Note**: the update will only be released for those devices matching the 0.0.1 version of your app.

0 commit comments

Comments
 (0)