focorner focorner - 1 month ago 22
iOS Question

Should iOS Universal Links work over custom ports?

I am trying to get iOS Universal Links to work for

https://my-domain.com:4443
(i.e. over SSL, but with a custom port number; not the conventional 443 port), but it isn't working.

I'm pretty confident I didn't do anything wrong, since my initial setup worked fine over port 443, and I simply changed the server port to 4443 to test the idea. In fact, I also added support for
applinks:my-domain.com:4443
in my Xcode project (I tried both with and without the port, without any luck).

I am asking the question, because I couldn't find anything on the subject in the official documentation.

Answer

This is expected behavior. There is nothing in the official documentation about supporting non-standard ports because non-standard ports aren't supported.

The only entitlement value allowed by iOS is a valid, bare domain (applinks:my-domain.com), which iOS will then use to check for an AASA file over SSL using the standard HTTPS port. In other words, when iOS queries either https://my-domain.com/apple-app-site-association or https://my-domain.com/.well-known/apple-app-site-association, it needs to find your AASA file without any redirects.