Ionic Code Push / Hot Update causes change from Production to Development Environment in App

I’ve followed this steps (https://ionicframework.com/docs/appflow/quickstart/installation) and allow my app to receive code push / hot update through ionic Appflow. However now I have unexpected error, which is, my app suddenly changed from the PRODUCTION to DEVELOPMENT.

This always happen.

The way I can replicate this issue is, I open the app, then I close it. Then I wait about 5 minutes, then when I open the app again, it suddenly in the development environment

My workaround now is to change my environment in DEV to use the PROD parameters.

Anybody has this issue? Or how to solve it properly?

Thanks

I’m afraid I haven’t used ionic code push for a good while now.

I can provide the scripts I’ve got for using Microsoft code push to do the same thing which works great,and is free

Thanks for your help.

I’ve googled. Is it this one?

Yes. It’s now called app center I think which offers other cool stuff like analytics etc.

It took me a day or so to get it done and now it’s part of my CI/CD workflow.

any help with this for updating my app?

Sure.

There’s enough people asking about this so I’ll do a proper post with the set up I performed.

Will keep you posted.

There’s likely additional help I can provide in terms of producing the binaries. I use PhoneGap Build for free and together I have the whole CI/CD process available to me.

Hi All,

I’m writing up some notes which I’ll release on the weekend.

https://golb.hplar.ch/2017/01/Hot-deploy-updates-to-Ionic-2-apps-with-CodePush.html

Unfortunately I didn’t get chance this weekend to get done what I intended which was a short vid detailling instructions. In any ways the document above (not my doc) is pretty good.

I do have a few example scripts for combining the various pieces together such as production build, pushing to Codepush in a develop / production scenario without you having to update a bunch of settings in the config.xml. I’ll get them onto github and update this post.