I’m new to Meteor and made a very simple meteor-based ios app for personal use and interest. I have a quick question and I just want to make sure that I am not spending time on meaningless work.
What I have done is “meteor run ios-device”, and it works pretty well that under the same network (wifi) the app on ios could read data from the localhost:3000 on laptop (Mac). Also, I have learned that it is easy to deploy a meteor app on my own server, just run “meteor build /path/to/buildFile --architecture…” and move the bundle to the server to set up; however, then I got confused about this: I am not pretty sure that after the app is deployed to a server, is it possible that the app on ios also able to access to that server?
In short words, app ios works fine with localhost, so is there a way to make it works fine with web hosting so that the app does not need to connect to the same network as the host?
Note that I didn’t purchase Apple developer account that could release app to AppStore, so I can only use “real machine debugging”. Will this disallow me to make app on ios access the data from my own server?
Thanks for any advance!
I would say yes, it can. I figured it out myself thank to OpenShift. Here is the link that I asked the same question in StackOverflow.
This is the guide that teaches how to deploy an app with OpenShift. (Note that OpenShift is kind of trick here that it uses github to help deployment, which may not satisfy your request somehow.)
OpenShift-Meteor deployment guide
Note: the guide above only tells how to deploy your app on OpenShift.
To access your app on OpenShift on own devices:
After you successfully deploy it on OpenShift, you can do this in your own project root directory: meteor run --mobile-server=[your OpenShift domain]:8000 ios-device. (I haven’t try other ports yet) That’s it!