Redirecting to Custom URL Scheme in iOS 13 Safari

My app Frax makes use of custom URL schemes to share presets via custom URL scheme links. This is done by sharing normal URLs, e.g. fr.ax/fe0ci, which our server then redirects to the custom URL scheme link; e.g. fraxhd://fr.ax/fe0ci.frx . This link opens in our app and tells it where to find the preset file (in this case, fr.ax/fe0ci.frx).


This worked fine in iOS 12 and earlier (all the way back to iOS 3), and in all other apps we've tried it with (e.g. Facebook). However, it is broken in iOS 13 Safari. The server attempts to redirect to the custom URL scheme link, but our app is never called or opened. The links still work fine from other apps (e.g. Facebook), and also when the custom URL scheme is pasted by hand into Safari. Only the server-based redirect mechanism has stopped working, and only in Safari.


Any idea why this might be, or what changed from Safari iOS 12 to Safari iOS 13, or how I might go about troubleshooting it? Thanks in advance!

Replies

This thread sheds some light: https://forums.developer.apple.com/thread/119186


In a nutshell, Safari is presenting itself (in the user_agent string) as a desktop browser instead of a mobile browser. So my server assumes the custom URL scheme won't work and doesn't redirect to it. Still looking for a way that the server can distinguish that it's being shown on an iPad.