Can I use Meteor with PhoneGap?

Can I pack and deploy a Meteor template as a PhoneGap application?

+68
cordova meteor
Apr 25 2018-12-12T00:
source share
7 answers

Yes, it is possible, but not by packing a meteorite application on the phone. Instead, you should point the phone table to your meteorite server (you can still use the API to access the functions on the device). Here are the instructions:

What is it. Compile and run the application.

A few time savings:

  • You can start customizing your meteor directory by copying the contents of the www / directory to the root directory of your meteorite server. Be sure to copy the javascript files in the client / directory so that they load before the main meteor js file.
  • Run app.initialize (window) from your main meteor js file, if the window parameter is not passed, the application crashes.
  • Do not try to configure the meteorite server in the www / directory in Xcode. You cannot install it on the device because the .meteor subdirectory contains symbolic links to your node modules.
+40
Oct 28 '12 at 15:20
source share

In version 0.9.2 of the meteor version, it is easy to use Phonegap: https://www.meteor.com/blog/2014/09/15/meteor-092-iOS-Android-mobile-apps-phonegap-cordova

+8
Sep 17 '14 at 9:20
source share

Well, I think the best starting point is to figure out how far you want / need to go.

Want to

  • Meteor.js PhoneGap application that connects to the server somewhere? then you probably want to use the Meteor classes in the PhoneGap project and connect to your server using Meteor.connect (url).

  • Permanently saving data in the application - it will be tough ... This is not something the Meteor was intended to do, although there certainly are ways to achieve this. I remember that discussions from the spine, spine and other JS systems on the client side. It’s easy to use local storage, but real efforts begin when you want to synchronize data between local and server.

This should help get to the point ...

+7
Apr 29 '12 at 11:41
source share

To some extent, I made a rough path, and the following process followed:

  • Todos example
  • Create a todos package with meteor bundle ../todos.tgz
  • Extract Package Open the extracted package in the editor.
  • Open the .js file in the static_cacheable / folder, and format it, and replace the ajax call from the "file: //" request with the actual host request.
  • I did this on line 1766, which creates an ajax handler using
 u.protoype._start = function(a, d, e, f){ d = d.replace("file://localhost","http://localhost:3000"); ... } 

After that, open the app.html file in a browser and make sure that the server is already running. Thus, you will work with most applications.

However, this is not the way you would like to use it in your real application, but with a lot of changes, you can use the client side in Phonegap with a server running somewhere else.

Edit

Meteor has a connect method to connect to another meteorite application that can resolve the above request for a replacement URL, although I have not tried what else.

+4
Apr 29 '12 at 9:20
source share

Here are the simple steps to connect the Meteor app to your mobile device using PhoneGap. Meteor to your mobile device using PhoneGap.

Just change your stream_clientbf90.js to a port on your domain. Works.

+4
Nov 24
source share

Here is a live demo on the phone + meteorjs + oauth2.
I created this meteorite app in google play.
https://play.google.com/store/apps/details?id=com.youiest.tapmatrix&hl=en
This is a private job, so it cannot disclose the source code.
Please feel free to ask questions.
There are several ways in which I tried to work with meteor + telephone communications.
Thank.

+2
Oct 18 '13 at 14:11
source share

There is also this package: https://github.com/awatson1978/cordova-phonegap

I have not tried this personally, but this is the right approach.

Update: In devshop August , telephone support was announced from the core team with cool demos and stuff.

To play with him:

 meteor update --release CORDOVA-PREVIEW@3 

Getting started: https://meteor.hackpad.com/Getting-Started-With-Cordova-Z5n6zkVB1xq

+2
Aug 13 '14 at 21:44
source share



All Articles