Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ


Choose your language

InfoQ Homepage News Meteor Brings Hot Code Push to Mobile Apps

Meteor Brings Hot Code Push to Mobile Apps

This item in japanese


Meteor 0.9.2 has been released. It supports building native iOS and Android apps via a new PhoneGap/Cordova integration, along with support for hot code push.

One of Meteor's core features is the ability to do hot code pushes. The new release brings this feature to iOS and Android apps. You can now package a meteor project as a mobile app (with PhoneGap). Once you distribute a meteor app, you can just do a hot code push from your server and each installed copy of the app downloads new code and stores it internally on the device. It then runs fresh code the next time the app is run.

In a nut-shell, meteor allows updates without going through the standard update mechanism (or the corresponding review process).

This seems to conflict with Apple's review policy, which clearly states that "Apps that download code in any way or form will be rejected". 

(Update: It seems that in the iOS developer agreement, there is an exception for the above policy, for JavaScript code that runs using built-in webkit; which Geoff confirms Meteor uses. Read this discussion for more details)

Slava Kim, a core member of the Meteor team, suggests that there are several ways in which a standard Meteor app is different from apps that generally get banned by Apple -

  • A Meteor-PhoneGap app still has complete functionality when you submit it to the app store, without necessarily downloading new code
  • You can use hot code push mainly for quick urgent fixes or tiny changes. You can (and should) avoid it for significant changes. Big changes such as supporting new device capabilities requires access to new native components anyways; in such cases you have to update your app through the app store and can't really rely on meteor. 

However, developers may want to err on the side of caution. 

Even if you do not use hot code push for your live app, it can dramatically improve your development experience. Having immediate updates on your simulator as you save new code reduces your code-execute-test loop. You can see this in action in Slava's and Matt's preview demo.

Late August, Meteor also announced a new packaging system, Isobuild. Isobuild promotes packages with isomorphic code that runs both on the browser-client and the server. It now extends this concept to mobile. You can add different target platforms to your Meteor project to make the same app run on both mobile (iOS as well as Android) and Web. Meteor builds on PhoneGap's existing cross-platform, isomorphic APIs and unifies them with the corresponding browser APIs. For example, the new camera package lets you take photos from desktop browsers and from mobile devices using the exact same code. While you can share majority of your code, you can also isolate code that is specific to an environment

However, some mobile specific functionality, such as off-line data, are not available yet. The Meteor team wants to focus on build and tool level support first.

You can read more about the Meteor-PhoneGap integration and how to use Meteor to build mobile apps on the project wiki.

The release also brings better mobile support for OAuth login - a new redirect based flow that works inside a UIWebView and the existing popup-based flow extended to work inside PhoneGap apps. To learn more about this release, view the release notes

Meteor is an open source, JavaScript framework that allows you to write client-code as if it were running on the server. It comes with several features such as live page updates, powerful data synchronization, latency compensation, hot code pushes and more. 

Rate this Article


Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Community comments

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p