2

I built an app that I got into apple’s test flight and today I sent out the notifications to users to start beta testing, but for some reason it is showing the user the previous build. If the user closes the app and reopens the app it shows the current version.

In my config.xml file I have defined

<plugin name="cordova-plugin-ionic" spec="5.2.8">
    <variable name="APP_ID" value="9dab4a60" />
    <variable name="CHANNEL_NAME" value="Master" />
    <variable name="UPDATE_METHOD" value="auto" />
    <variable name="UPDATE_API" value="https://api.ionicjs.com" />
    <variable name="MAX_STORE" value="2" />
    <variable name="MIN_BACKGROUND_DURATION" value="30" />
</plugin>

Is something wrong here? Not sure why this is happening. This also was happening to me when I was testing on my own device using a development provisioning profile. I had to always open the app once, close it and reopen it to see the new build. Any ideas?

Ronnie
  • 11,138
  • 21
  • 78
  • 140

1 Answers1

0

Possibly when you first made the app the method should be background. So it downloads the updates and only updates on the next run. The auto method checks the splash and installs immediately.

I also still have questions about the live deploy. In your case you have to generate a new package build. I realize that live deploy does not update when you add native plugin. Have you been through this?

lams
  • 1,492
  • 2
  • 9
  • 26
  • 1
    My issue ended up being a couple diff items. 1) The version spec for the Deploy plugin (cordova-plugin-ionic) was different between my config and package files. These should be identical. 2) Same goes for cordova-plugin-ionic-webview; this one is a bit more egregious, as I had v2.X in config.xml and v4.X in package.json! 3) I would also suggest making sure the version numbers for the overall application match between those two files: I was using 1.0.0 in config.xml, but 0.0.1 in package.json. After this fix, I removed node_modules and reinstalled and then everything started working as expected – Ronnie May 13 '19 at 22:16
  • @Ronnie hum .. And how do you distribute your apps and manage updates? As far as I know the Live Update does not install native plugin ... – lams May 14 '19 at 13:52
  • 1
    Depends on the update. If you have to add any native functionality a new binary is required to be submitted to the app stores. If you are updating some html, css or JS logic that your app does you use appflow. The binary that you submit to the app store should be pointing to your production channel. Say you make a new feature on a branch called featureXYZ and you've tested it and its ready to go to production. Next step would be to merge code to master and then create a new web build from master and assign it to the production channel – Ronnie May 14 '19 at 16:15
  • @Ronnie Great. his explanation was exactly what he was looking for. I had understood that Appflow would do the binary update as well. but now that you've explained everything fits my tests. I have a customer who does not want their app open on Google play or the Apple Store. do you know any other service that I could do the distribution and update? I know pushlink to apk, but it does not support hybrid applications ... – lams May 14 '19 at 19:02
  • 1
    I haven't looked into something like that, but I think the better route would be using the enterprise app store which is something both google play and apple app store support – Ronnie May 14 '19 at 21:21
  • 1
    @Ronnie You gave me a good idea. I'll see if I can have restricted-access enterprise applications. thank's for your time. – lams May 15 '19 at 12:29