After many hours of struggle, I found a solution on this. As a result, I actually need to follow EVERY single step as provided here, here and here. I really need to cross check between these 3 links to make things work.
Here is what I did:
1) In Visual Studio Package Manager Console, do this npm install -g code-push-cli
. This will install the necessary for CodePush CLI
2) In the console, do code-push register
. This will open a browser and register your account and associate with github or microsoft platform for code sync later on.
3) After successful registration, do code-push login
. This will open up the browser and generate an access key for you. Suppose, a CLI will pop up and allow you to key in the access key for login. But in my case, the console hang. So I have to do code-push login --accessKey <accessKey>
method to login.
4) After that, do code-push app add <app_name>
to register the app. This will send info to code push server and allow your app to perform code push
5) Do code-push deployment add <app_name> "Staging"
to enable the app for deployment to server
6) When adding for deployment is successful, do code-push deployment ls <app_name> -k
to retrieve the Deployment Key for Staging and Production
I still need to trial-and-error for using the code in the application. But at least I'm manage to get the deployment key for now.
Hope it helps those who are using ionic with code push