Hot code push on iOS not working

I’ve been looking through the forums trying to find information regarding hot code push on iOS and have come up short so I thought I’d pitch in with the issue I’m having right now.

Here are two console logs running at the same time after the server got updated. The top one is safari dev showing the iPad app and the other is chrome showing the web app / server:

As you can see the autoupdate version for cordova doesn’t match, which I’m assuming should trigger the hot code push, right?

  • /__cordova/manifest.json is accessible from the server
  • I’m running meteor v1.4.0.1
  • I’m deploying with the latest build of MUP
  • Tried running the iOS app from meteor run ios-device --mobile-server [ip address] with the same result
  • ROOT_URL on server and in app match up

Is there a hot code push log somewhere? Can I enable a flag to output hot code push related logs to console? Any other steps I can take to fix this? Any help in debugging this would be greatly appreciated!

What did you change compared to the previous version? See for example this comment:

An update in Meteor version could for example not allow hot code push because Cordova changes are made.

Since I was testing this again and again my updates were minimal. The
difference between the two versions I mentioned above are 3 lines of HTML,
no updates to Cordova or meteor or any npm package.

Ok that is good info. And I see you are testing on local ip’s here, or is this deployed to a server?

Do you see anything in the xCode debug log?

I assume reactivity works, so the connection to the server etc. is all fine?

Yeah I’m just running things locally for now, have a local development server to test on.

I haven’t checked the xcode logs thoroughly enough, I’ll do that tomorrow morning and report back.

Yeah everything else works great, just the HCP I’m having some struggle with.

Thanks for the help, greatly appreciated! is the expert on this from MDG. He might be able to help you with looking at those exact version numbers.

You already reviewed this? Most of Martijn’s responses are about configuring the right ROOT_URL.

Do you have a working mobile-config.js file as well? Maybe that’s needed.

This one is interesting for MUP: Mupx cordova build

Thanks for all the info @lucfranken!

I was going to @-mention Martijn since I saw him answering so many of the HCP related questions but it felt a bit pushy so I decided not to :slight_smile: Hopefully he sees this and can chip in.

ROOT_URL is exactly the same on the server vs the client, to the letter. I have a working mobile-config.js. And yeah, I’ve got serverOnly enabled in the mup.js buildOptions.

I’m going to take a look at the Xcode console next and check if there’s anything helpful to find.

1 Like

Please feel free to @ mention anyone on this forum, MDG or otherwise. This forum is all about promoting communication amongst the awesome Meteor community, of which MDG plays an important part. Anyone @ mentioned can chose to ignore your reference, but 9 times out of 10 they won’t, as they understand the importance of maintaining and continuing to build upon our awesome community.

(Now @ mentioning core devs via GitHub when logging new issues, that’s a bit of a different story. When it comes to GitHub issues we need to let the triage process do its job; core devs will be notified/pulled in when necessary.)

Duly noted :slight_smile: I’ll @ mention him after I check the Xcode logs.

Xcode logs show that the app notices the changes on the server, manifest is fetched and assets from the new manifest version (which matches the hash on the server) seem to be downloaded … but nonetheless nothing is applied within the app. Here’s the xcode log output:

2016-08-17 14:01:05.191 Smartboard[581:853014] Start downloading asset manifest from: manifest.json -- 2016-08-17 14:01:05.224 Smartboard[581:853201] Downloaded asset manifest for version: b9d006122ccf5cb5d5c3e796b3b03429ebf0dd84 2016-08-17 14:01:05.236 Smartboard[581:853201] Start downloading assets from bundle with version: b9d006122ccf5cb5d5c3e796b3b03429ebf0dd84 2016-08-17 14:01:05.354 Smartboard[581:853589] Finished downloading new asset bundle version: b9d006122ccf5cb5d5c3e796b3b03429ebf0dd84 2016-08-17 14:01:05.355 Smartboard[581:853568] [CDVTimer][assetBundleDownload] 118.528008ms 2016-08-17 14:01:05.408 Smartboard[581:853014] Resetting plugins due to page load. 2016-08-17 14:01:05.769 Smartboard[581:853014] Finished load of: http://localhost:12944/?cdvToken=4D0B0092-99C5-4460-B42F-CCB9E3AA55EB-581-000008EEA0A7510C 2016-08-17 14:01:06.081 Smartboard[581:853014] Start downloading asset manifest from: manifest.json -- 2016-08-17 14:01:06.101 Smartboard[581:853568] Downloaded asset manifest for version: b9d006122ccf5cb5d5c3e796b3b03429ebf0dd84

One thing I noticed in the manifest.json on the server is that the only html file listed there is head.html. The changes I’m currently making are within html and I was under the impression that hot code push would update that, based on the meteor documentation:

However, it is important to realize that hot code push can only be used to update the HTML, CSS, JavaScript code and other assets making up your web app.

Maybe @martijnwalraven can chime in here? Not sure what I’m missing :confused:

You don’t have reload on resume installed?

Nope, I don’t want the app to wait for the app to close and open again … I want it to reload as soon as the update is there. Here’s my package list:

$ meteor list blaze-html-templates 1.0.4 Compile HTML templates into reactive UI with Meteor Blaze ecmascript 0.5.7 Compiler plugin that supports ES2015+ in all .js files es5-shim 4.6.13 Shims and polyfills to improve ECMAScript 5 support fastclick 1.0.12 Faster touch events on mobile fortawesome:fontawesome 4.5.0 Font Awesome (official): 500+ scalable vector icons, customizable via CSS, Retina friendly fourseven:scss 3.8.1 Style with attitude. Sass and SCSS support for Meteor.js. hot-code-push 1.0.4 Update the client in place when new code is available. http 1.2.8 Make HTTP calls to remote servers insecure 1.0.7 (For prototyping only) Allow all database writes from the client jquery 1.11.9 Manipulate the DOM using CSS selectors meteor-base 1.0.4 Packages that every Meteor app needs mobile-experience 1.0.4 Packages for a great mobile user experience momentjs:moment 2.14.4 Moment.js (official): parse, validate, manipulate, and display dates - official Meteor packaging mongo 1.1.10 Adaptor for using MongoDB and Minimongo over DDP percolate:synced-cron 1.3.2 Allows you to define and run scheduled jobs across multiple servers. reactive-var 1.0.10 Reactive variable remcoder:chronos 0.5.0 Reactive time utilities. Includes reactive replacements for new Date(), and moment() seba:minifiers-autoprefixer 1.0.1 Standard minifiers used with Meteor apps by default + css autoprefixer. session 1.1.6 Session variable simple:rest 1.1.1 The easiest way to add a REST API to your Meteor app standard-minifier-js 1.1.8 Standard javascript minifiers used with Meteor apps by default. tracker 1.1.0 Dependency tracker to allow reactive callbacks

Just takes a while for the pages to get refreshed … Not instantaneous. And aometimes it does not while running locally without scratching my head … I just remove the buold folder or run meteor reset and move on … Tedious but works. On the other hand app fully built and installed gets refreshed from server without any issues. I deploy my app for testing in diawi and while it is pointing to the server make live changed on the server( test instance of course) and some times this works best when te piece of code is not using any Cordova plugins.

Any other ideas or ways of debugging this @lucfranken / @martijnwalraven?

No other ideas? There must be a better way of debugging this …

Sorry, I’m on vacation and haven’t had time to look into this. But the fact that the manifest only lists head.html sounds like there might be an issue with the changes you’ve made. Without index.html in there, we won’t be able to verify the downloaded version and the switch won’t be made.


I don’t know if I have the same issue. But when I add an image - after the initial build - to the public folder to use in a plugin (ex: a map marker png) I can’t access it.

That’s what I was leaning towards too. It seemed weird that there was no mention of that html file in the manifest.

Is there a way for me to reset the manifest or somehow add the file to it?

Any other ideas @martijnwalraven? I’m still completely stuck here, can’t find anything relating to this specific problem on the forums.

@trymbill: do you use WKWebview (default) or UIWebview? (can be switched with a preference in mobile-config.js)

hot-code-reload seems not to work with UIWebview on my app (I needed UIWebview, because cordova-settings like enabling autoplay for videos are broken on WKWebview)…