13

Can one use meteor to build mobile applications ?

The application in phonegap data synchronization?

Community
  • 1
  • 1
marcelo.delta
  • 2,730
  • 5
  • 36
  • 71
  • 1
    Commenting just to say that I'd like to see if this is currently possible as well. – Scott Magdalein Sep 22 '13 at 13:55
  • 1
    Take a look at this: http://stackoverflow.com/questions/10322723/can-meteor-be-used-with-phonegap – Andrew Lively Sep 22 '13 at 22:45
  • commenting just to say people do build iOS apps with phone gap and they get them into appstore. Watch videos from Meteor Devshop 8 on youtube, the second talk is about such app. Another example is questful - iOS app built with Meteor – imslavko Sep 28 '13 at 04:27
  • I think it can be done, here's a meteor package that uses cordova but fails gracefully if it's not there. https://github.com/raix/Meteor-Cordova I would assume you'd just have to take the css and js files that you get from a bundled Meteor app and throw them in the proper directories. – Dave Sep 30 '13 at 17:18
  • +1 im also intersting in buliding phonegap with meteor. im waiting for a good guide and best practice. i hope tom coleman will release an extra chapters about it in the discover meteor book. – Boaz Hoch Nov 05 '13 at 09:53

3 Answers3

9

In addition to Morten Henriksen's Meteor-Cordova approach mentioned above (as mentioned in comments), you should also take a look at Kasper Souren's meteor-phonegap, and Abigail Watson's Cordova-phonegap package.

Alan Blount has written a nice blog post (from late August, 2013) summarizing and assessing the various approaches:

Meteor + Phonegap/cordova (roundup – Fall 2013)

Last but not least, there's Tom Coleman's Devshop talk, "How to get your Meteor app into the App Store," which is viewable on the Meteor YouTube channel.

jadewang
  • 347
  • 2
  • 5
2

As of Meteor 0.9.2, support for building mobile apps in Meteor, for both iOS and Android! Now with just a few new Meteor commands you can add PhoneGap / Cordova packages to your app...

Check out Meteors blog post about it: https://www.meteor.com/blog/2014/09/15/meteor-092-iOS-Android-mobile-apps-phonegap-cordova

Justin
  • 215
  • 1
  • 9
1

I just published a new package that fixes the issues with the methods mentioned in jadewang's post and Alan Blout's blog. Installation and setup are really straight forward. Check the readme.


Overview

Cordova Loader's goal is to make using Meteor with Cordova as easy as using Meteor itself. The compiler interprets the provided Cordova project directory and compiles the assets into minified, platform-specific JavaScript files that are placed in the Meteor /public directory. When the client loads, it automatically pulls in the platform-specific file for that device. The Cordova API can be used from Meteor the same as it is from vanilla JS apps. Enjoy!

Cordova Loader


Comparison with methods described here

  • Lazy Loading (cordova-phonegap): Hard to manage all of the Cordova dependencies / Unfinished / Outdated
  • Hijack (meteor-rider): Slow initial load / Can't use appcache / Issues with plugins.
  • iFrame (meteor-cordova): iFrames generally are a pain including slow performance in native apps, glitchy scrolling, and having to wrap Cordova
  • Cordova Loader:
    • Manages assets for you
    • Fast loading
    • Compatible with appcache
    • Compatible with Cordova plugins
    • No need for wrapper around Cordova
    • Minifies platform specific bundles
    • Automatically lazy loads platform specific bundles in client
    • Watches Cordova project plugin directory for changes