Multiple apps with the same URL Scheme - iOS

后端 未结 4 538
暗喜
暗喜 2020-12-23 17:10

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 ap

4条回答
  •  青春惊慌失措
    2020-12-23 18:12

    As covered by the other answers in this thread, it is perfectly acceptable for multiple apps to be registered as capable of handling a particular custom URL scheme, and if there are 2+ apps installed on the device which are capable of handling a particular custom URL scheme, it is undefined as to which app will be selected by the system at runtime.

    If it is important for your particular use case that your app and only your app is registered on the device as capable of handling a particular URL, then prefer universal links over custom URL schemes. Universal links are standard HTTP or HTTPS links and the rough idea is that, on installation of your app, the system checks a file stored on your web server to verify that your website allows your app to open URLs on its behalf. If your app is not installed on the device when such a URL is opened, the system opens the URL in Safari as normal, allowing your website to handle it.

    For further information on both universal links and custom URL schemes, refer to the Allowing Apps and Websites to Link to Your Content documentation page.

提交回复
热议问题