Skip to content

rangle/code-push-demo

Repository files navigation

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
  1. Register and login
code-push register
code-push login
  1. 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"
  1. 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 <accessKey>
  1. Create a new app.
code-push app add <appName>
  1. 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 <appName> ios
code-push deployment add <appName> android
  1. 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
  1. The versions list is available at:
http://codepush-deployments-lists.s3-website-us-east-1.amazonaws.com/<yourRepName>-codepush-deployments.json

About

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

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •