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!
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.
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 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.
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.)
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:
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
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(), Date.now() 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.
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.
@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)…