Kent Bull
Kent Bull

Reputation: 1152

How to get Ionic Pro Deploy to download latest version on first app open

Problem

When I release a new version to the production channel in Ionic Pro Deploy (Channels) then I have to cycle my app twice in order to get the latest version. Even worse, on the first cycle my app reverts back to a far earlier version for some reason.

What I mean by cycling is, starting from a state where the application is shut down and not open, I open the app, wait for the splash screen to go away and app to be ready, and then close the app.

Question

How do I get my app to download the latest version on the very next time I open the Ionic app following my production release?

Plugin configuration

I used the plugin config from the dashboard.ionicjs.com page: cordova plugin add cordova-plugin-ionic --save \ --variable APP_ID="[myappid]" \ --variable CHANNEL_NAME="Production" \ --variable UPDATE_METHOD="background"

Upvotes: 2

Views: 762

Answers (2)

Matthew
Matthew

Reputation: 3071

In my case, live deploy worked correctly on a "blank" Ionic project. Live deploy also worked correctly on "my" app on iOS but not on Android.

I followed the follow steps and successfully fixed Android. However, during this process iOS suddenly had the same problem (would apply update on app install/close/open).

  1. Set versions as per Ionic support. IonicPro live deploy currently requires these versions. Ionic are in the process of fixing this dependency:

    "cordova-plugin-ionic-webview": "1.1.19", "cordova-plugin-ionic": "4.1.7",

  2. Install a new version of "blank" project. Update my app to use the same npm plugin versions (some of my app plugins were old).

  3. Remove/add android platform. My hunch is this is what ultimately resolved the issue.

I wanted to try a remove/add ios platform to see if that also resolved the issue on iOS. But it was less work to ultimately switch over to IonicPro rather than re-config the local build setup.

Live deploy worked correctly on both iOS and Android after creating binaries in IonicPro.

Upvotes: 0

Merlin B
Merlin B

Reputation: 61

Execute the command you already showed but set UPDATE_METHOD to "auto"

If you wand more control over your updating methods have a look at this: https://ionicframework.com/docs/pro/deploy/plugin-api.html

Upvotes: 1

Related Questions