So for my new app I'm having a URL scheme so that people can launch my app from another app or from a website... "myapp://" ... So what happens if there is another app in the AppStore that has the same URL scheme as mine? Or if someone tries to steal my URL Scheme?
URL schema is used as an identifier in launching applications and performing a set of commands in iOS devices. The schema name of a URL is the first part of a URL. (e.g. schemaname:// ). For web pages, the schemas are usually http or https.
The app: URL scheme can be used by packaged applications to obtain resources that are inside a container. These resources can then be used with web platform features that accept URLs.
If two apps register the same custom URL scheme, it is undefined which app will actually be launched. One will be launched but there is no way to know.
Here's a real kicker. If you have two apps on your device with the same URL scheme, and you delete the one that actually gets launched, the other one will not get launched by the URL without rebooting the iOS device.
Your best solution is to ensure your custom URL scheme is not trivial so there is little chance another app will have the same scheme.
According to the Apple docs:
If multiple third-party applications register to handle the same URL scheme, it is undefined as to which of the applications is picked to handle URLs of that type.
Exact quote from the Apple docs, for 8 consecutive years:
Note: If more than one third-party app registers to handle the same URL scheme, there is currently no process for determining which app will be given that scheme.
Sources:
As of September 2019, this part of the documentation was removed from the Apple website. The closest related document may now be Register Your URL Scheme.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With