Server and Ports

Hi All,

I have an app that I submitted to the app store. The app connects to our server on port 8081, we have tested this app
in several different locations to make sure it is working. We tested on different Wifi and cellular connections and all is working.

The app got rejected for the reason it can’t connect to the server. I mentioned to the reviewer if they have a firewall
it may be blocking that specific port, but they still can’t connect.

Any suggestions that may help would be appreciated.


Can you use port 80? Or use port 80 and map it internally to 8081?

Hi Hal,

I have a webserver running on port 80, maybe I will turn the web server off and try your suggestion.


Another option would be to use different servers / IP addresses so both can be on port 80.

Could you use port 443 (HTTPS) for one of them?

Yet another option would be to use NGINX as it could route to the web site and to the app server. Lots of options! :slight_smile:

I have the server running on port 80, everything seems to work. Will this work with Apple when they are reviewing the

Is that port opened normally on all routers?

Thanks all for the awesome advice.

Last time I submitted a ‘server app’ i was rejected because I was not testing to ensure that there was an internet connection to connect to… Apple will suggest a ‘reachability’ module that you should use to ensure that your clients and servers behave without timing out and blocking the user.

@Gurdip Gill — I think Apple no longer allows apps to connect to unsecured (HTTP) web servers if they use NSURLSession or NSURLConnection internally.

You should get a free certificate and make your web server run on port 443 (HTTPS)

See this article

If you need to check if you have internet connection, a full implementation of the Reachability module you mention is contained within iOSKit.

I found the problem, just incase anyone else runs into this when submitting to the app store.

Apple now only accept ipv6 when connecting to a server, I was using ipv4 for all my testing, switching to ipv6
and the app was accepted.

Thanks for all the help. :slight_smile: