printfx000
printfx000

Reputation: 51

how to test universal links on local server?

I am developing an app on Android and IOS and I would like it to support universal links. I already have an apple-app-site-association file deployed on my PROD server (which is something like www.example.com), but I need to redeploy a new one with some restrictions inside (to NOT allow some paths). Before redeploying it, I would like to test it on my test server. So I deployed it on the test server (which is www.example.test.local).

To test, I modified my IOS app by changing in Associated Domains the param applinks:.example.com by applinks:.example.test.local. Then I builded my app and tried to click on an url which is www.example.test.local/myPath?myQueryParam=toto (which is not a 'NOT allowed' one). But instead of opening the app, it opened the index of my test server (if I rollback everything and click on an url like www.example.com/myPath, it works perfectly but it is the old apple-app-site-association file).

So did I miss something? What do I have to change to make it work on my test server?

Upvotes: 4

Views: 2291

Answers (1)

Andrew Hodgkinson
Andrew Hodgkinson

Reputation: 4779

Late to the party here, but most likely your .local server was running on HTTP. You need to use HTTPS, with a valid certificate that the iOS device recognises (try fetching the AASA file by just typing in the URL, including https:// prefix, into Safari; if you get "This Connection Is Not Private", then your cert isn't good enough - stepping through warnings and forcing Safari to visit the site anyway may be enough to get the trust store updated and have the wider system accept your cert).

Unfortunately, like everything to do with app links on iOS and Android, it's a huge pain and exceptionally developer-hostile. There does not seem to be any kind of easier test option for local machine development - or at least, nothing that I can find documented.

Upvotes: 1

Related Questions