URL identifier and URL scheme

帅比萌擦擦* 提交于 2019-11-28 18:39:53

According to Apple documentation they don't give much info about the identifier and why it is needed or where it is used. They only say that it should be unique:

A string containing the abstract name of the URL scheme. To ensure uniqueness, it is recommended that you specify a reverse-DNS style of identifier, for example, com.acme.myscheme. The string you specify is also used as a key in your app’s InfoPlist.strings file. The value of the key is the human-readable scheme name.

Also if more than one app specify the same url scheme, then the outcome is unpredictable:

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.

The experience taught me that the app who first registered that scheme will be opened, but this may be wrong.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!