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.
- Host: GitHub
- URL: https://github.com/rangle/code-push-demo
- Owner: rangle
- Created: 2015-12-11T15:10:22.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2021-01-26T22:55:37.000Z (over 5 years ago)
- Last Synced: 2025-03-24T14:13:25.456Z (about 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 2.52 MB
- Stars: 11
- Watchers: 5
- Forks: 7
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
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
```