Meteor Cordova Production

六眼飞鱼酱① 提交于 2020-01-01 07:27:05

问题


I'm new to Cordova. Sorry if these are amateur questions. I'd like to know more about the setup and architecture of how a typical phone app.

I've got a local version of a Meteor Cordova build working and it's connecting to a remote server/db via Modulus. But I'm confused about how everything will work once the app is complete.

  • When you apply to the app store do you provide your remote server/db to them for the build/install of the app?
  • What server is actually running the mobile version of your app?
  • Hot code pushes sound great. How the heck does that work? haha

I'm not looking for specifics (unless you're feeling generous) just some higher level info about this process would be great.


回答1:


I'll lend you what little I know/how I'm doing it. First off, my app doesn't connect to the live database except for a few things controlled by a master admin. So because of that, this won't be totally relevant to your questions.

So, the set up. First, once you get your local app running follow the steps here: https://github.com/meteor/meteor/wiki/Meteor-Cordova-Phonegap-integration for testing and eventually building. For your --mobile-server option, put in the server where your remote app lives (important for facebook logins, etc).

The server that's running is mini-mongo locally, just like in your browser. You can set your remote db url by:

MONGO_URL=mongodb://username:password@remote.mongodb.net:27017 meteor run ios-device --mobile-server http://yourappname.meteor.com

As for other things when submitting to the app store, it's the same process as ever. When you build or run your app in cordova, it makes a directory at

/.meteor/local/cordova-build

Which contains all the normal resources your app needs. From there on, it's just more cordova stuff. You need to handle white listing, etc.

Now back to my master admin thing. That will exist at appname.com and will connect to the same database that I specified in my meteor build. That will handle the hot code reloads.

That's about it man, good luck.



来源:https://stackoverflow.com/questions/28727648/meteor-cordova-production

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!