1
votes

Hot code push is not updating iOS users of Meteor Cordova apps. If I add .pngs, fonts, or other assets to my app and push them to the server, the Android users get the HCP update, but iOS users don't.

Some users report it even is caused by upgrading to Meteor 1.8 without changing any assets.

I can't get any code updates to iOS customers. Can anyone help?

1

1 Answers

1
votes

This is a known problem in the Meteor Cordova plugin that makes hot code push (HCP) happen. As discussed in the Meteor forums, which I'm linking here because the links are stable and the discussion is long, the problem is due to __cordova/manifest.json containing duplicate versions of every asset, one with __cordova in the "url" field, and one without __cordova in the "url" field. The webapp plugin tries to copy/move both versions into the update on the phone during HCP, and the 2nd version, being a duplicate of the asset, fails because the asset already exists due to it having just been updated by the first instance of the asset in the manifest.

You can work around this by putting your assets in a CDN instead of locally in your /public directory and changing the references to them in your code accordingly, but that won't solve it if the Meteor upgrade to 1.8 has asset updates, which it seems to for some users.

You can also apply the workaround bug fix provided here https://github.com/meteor/cordova-plugin-meteor-webapp/pull/59, but this requires updating the iOS phone version of your app so that users can get the fix, at which point you could also have updated your assets in the iOS update to get around the problem, but you'd have the fix for future HCP to work.

Details at: