Hi,
Generally speaking, is HPC technically supported by the iOS Cordova application?
Are there any technical restrictions from Apple?
Thanks.
Hi,
Generally speaking, is HPC technically supported by the iOS Cordova application?
Are there any technical restrictions from Apple?
Thanks.
I will answer for 2.x versions, when I last used Cordova.
Server changes - no HCP (Hot Code Push) (technically, a new client bundle version may be produced)
Various client changes, such as import of a new NPM, (import of a new component in React) will not be deployed via HPC. Once an update is not deployed, further deployable update will not deploy because one update keeps the HCP “stuck”.
Change a button color, most probably will deploy to clients with no issue.
I do not believe there are technical restrictions from Apple other than those in the security and design guidelines.
Part or all of my information might be outdated :)))
FWIW I’ve been using Meteor to build Cordova apps on both iOS and Android for about five years, all the way up to Meteor 3.2, and have never had issues with hot push code updates, either with reliability or from Apple/Google.
The only limitation is that Cordova plugins can’t be hot-pushed, and it will refuse to HCP if there’s a mismatch in Cordova plugin versions. I work around this by setting these two environment variables in my build script (where static_version_id
can be any string):
export METEOR_CORDOVA_COMPAT_VERSION_IOS="static_version_id"
export METEOR_CORDOVA_COMPAT_VERSION_ANDROID="static_version_id"
If I make changes to Cordova plugins I always assume they may not be available in the JS code, so I check that the plugin’s API exists in JS before using.
Thanks @banjerluke and @paulishca
Ok. So, there is something wrong in my side.
I have a android app that works without any problems. HCP works very well.
Now i am starting the development of the ios app. Everything works except HCP.
I am using meteor 3.2.2 and it is the first time i build the ios app so i have no previous experience.
I use also the quave:reloader package.
I do not know how to debug it
Hi,
After investigation, I found that HCP was working for Android and IOS in development mode (with and without --production
) ans also for Android in production.
Than, I found this issue with this comment : Hot Code Push broken on iOS · Issue #10277 · meteor/meteor · GitHub
As my app runs behind NGINX
, I add the following to my site configuration:
location ~* /__cordova/manifest\.json$ {
limit_except GET HEAD POST { deny all; }
proxy_pass http://127.0.0.1:3000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
proxy_set_header X-Forwarded-For $remote_addr;
# Désactiver complètement le cache pour le manifest Cordova
expires -1;
add_header Cache-Control "no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0";
add_header Pragma "no-cache";
}
And now HCP for IOS on production works!
It would be nice to add something about the fact that the manifest.json file should not be cached in Deployment and Monitoring | Meteor Guide