Deploy Meteor App on iOS - Basic Questions

Hey guys,

I am deploying a mobile app for the first time and having a little trouble understanding the process. I decided to start iOS-only and the app is ready to launch. However, I have a few very basic questions:

1 - How does hosting for mobile apps work? Should I deploy my app on Heroku (or similar), connect it to an external MongoDB (like Atlas or mLab) and then submit it to Apple? Or is the process different?

2 - The Meteor instructions end with meteor build. From this point on, the work is done on Xcode, which is when things start getting very obscure. Can anyone give me a more step-by-step explanation of what to do?

Thanks!

1 - How does hosting for mobile apps work? Should I deploy my app on Heroku (or similar), connect it to an external MongoDB (like Atlas or mLab) and then submit it to Apple? Or is the process different?

Yes, deploy to Heroku (or Meteor Galaxy), connect to MongoDB service, and first test using TestFlight, then submit to Apple.

2 - The Meteor instructions end with meteor build . From this point on, the work is done on Xcode, which is when things start getting very obscure. Can anyone give me a more step-by-step explanation of what to do?

The Meteor Guide as a step by step explanation. If you still have questions you can ask that specific question.

3 Likes

Thanks!

I deployed to Heroku and pointed MONGO_URL to my MongoDB Atlas URL during the process with heroku config:add MONGO_URL=mongodb://<My_URL>.

However, I am unable to open the app and keep getting this error on the heroku logs:
MongoError: no mongos proxy available

Do I have to write any code on the project to configure Atlas?
I found some threads discussing this error but none reached a solution… any idea?

You will need to make sure MongoDB is configured correctly in your Heroku environment. We use Galaxy and MongoDB Atlas and we have something like this in our settings.json file for production environment.

"galaxy.meteor.com": {
    "env": {
      "MONGO_URL": "mongodb://yourapp:XXXXXXXXXXXXXXXX@yourapp-shard-00-00-zc1lg.mongodb.net:27017,yourapp-shard-00-01-zc1lg.mongodb.net:27017,yourapp-shard-00-02-zc1lg.mongodb.net:27017/meteor?ssl=true&replicaSet=yourapp-shard-0&authSource=admin",
      "MONGO_OPLOG_URL": "mongodb://yourapp-oplog:XXXXXXXXXXXXXXXX@yourapp-shard-00-00-zc1lg.mongodb.net:27017,yourapp-shard-00-01-zc1lg.mongodb.net:27017,yourapp-shard-00-02-zc1lg.mongodb.net:27017/local?authSource=admin&ssl=true&replicaSet=Yourapp-shard-0"
    }
  },

You will have to configure something similar in your Heroku environment. You can search this forum for other posts on configuring MongoDB Atlas URL and OPLOG_URL.

Also, you can test the configuration of MongoDB Atlas using the tools they provide. No need to write any code in your Meteor project, but make sure when you build the project MONGO_URL and MONGO_OPLOG_URL are set.

Thanks for the instructions! I ended up choosing the easy path: I moved from Atlas to mLab and it worked right out of the box with zero config.

So now the next step is to meteor build my app and then move on to Xcode, right?

I am not sure what to do now that my app is running on Heroku… should I build it pointing to my Heroku URL as the server? Something like:

meteor build --server <app_url_from_heroku>

And then throw the resulting build on Xcode and move on from there to Testflight/App Store… or should I do something different?

Update: I ran meteor build --server <path> <app_url_from_heroku>

Then, I followed the instructions on Meteor Guide:
1 - I opened the generated myapp.xcodeproj file (on XCode).
2 - I connected my device and ran it.

The result is: The app is there, but it has no connection to my Heroku server (doesn’t recognize any of the users I had created).

I thought the problem might be that I haven’t specified a port on the build command, but then I found out the Heroku doesn’t allow you to specify ports.

Any idea what I am doing wrong?

I got the exact same problem, did you solve it??

1 Like

Did you set the ROOT_URL environment variable as described here: