An open API service indexing awesome lists of open source software.

https://github.com/rangle/code-push-demo

An example of how to use CodePush with an Ionic/Cordova app.
https://github.com/rangle/code-push-demo

Last synced: about 1 year ago
JSON representation

An example of how to use CodePush with an Ionic/Cordova app.

Awesome Lists containing this project

README

          

# Code Push Demo

An example of how to use CodePush with an Ionic/Cordova app.

## Getting Started

1. Install the CodePush CLI
```
npm install -g code-push-cli
```

2. Register and login
```
code-push register
code-push login
```

3. CodePush uses Github/Microsoft Live accounts for authentication. However, you will want to create a shared login which can be used by multiple devs.

```
code-push access-key add "shared login for my account"
```

4. Use the access key generated by the above command to login. *Warning* this gives full access to all your apps. To avoid that, create a Github account for the project and use that to generate the access key.

```
code-push login --accessKey
```

5. Create a new app.

```
code-push app add
```

6. Create deployment targets for iOS and Android. These keys need to be added to `config.xml` and can be used to fetch latest deployments to `master`.

```
code-push deployment add ios
code-push deployment add android
```

7. Add a deployment step to `circle.yml`. The following pushes updates to the master branch deployments, for both iOS and Android. And updates the versions list.

```
deployment:
staging:
branch: /.*/
commands:
- node deploy.js $CODE_PUSH_APP_NAME $APP_STORE_VERSION $CIRCLE_PR_NUMBER
- node ci-hook.js $CIRCLE_PROJECT_REPONAME
```

8. The versions list is available at:

```
http://codepush-deployments-lists.s3-website-us-east-1.amazonaws.com/-codepush-deployments.json
```