Dude
Dude

Reputation: 1045

iOS app can't connect to server after restarting

I have disabled Hot Code Push with solderzzc:disable-hot-code-push I have set up my AWS EC2 with mup when I create a meteor build with --server=IP:PORT -flag or try it with meteor run ios-device --mobile-server=IP:PORT -flag

My app is working like expected on first run and is connected with the AWS EC2 server. It works also fine with TestFlight and so on BUT when I close (not in the background. a "real" app shutdown) the app and do a second coldstart my app cant connect to the server anymore. It looks like its changing the servers IPs so my app cant connect anymore.

Any ideas how to fix this?

My mup env settings:

"env": {
    "ROOT_URL": "http://54.218.x.x",
    "MOBILE_ROOT_URL": "http://54.218.x.x",
    "PORT": 3000
},

Upvotes: 0

Views: 168

Answers (1)

vdonkey
vdonkey

Reputation: 106

I got a similar problem like you. My mobile App worked fine when newly installed but lost connect to the server after an HCP took place. I solved that by adding ports to the URLs.

There are two more URLs I've collected, without knowing the difference and which one is functioning actually:

"env": {
    "ROOT_URL": "http://54.218.x.x:3000",
    "MOBILE_ROOT_URL": "http://54.218.x.x:3000",
    "MOBILE_DDP_URL": "http://54.218.x.x:3000",
    "DDP_DEFAULT_CONNECTION_URL": "http://54.218.x.x:3000",
    "PORT": 3000
}

Hope this will help

Upvotes: 1

Related Questions