Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Guaranty the uniqueness of URL schemes (CFBundleURLSchemes) entries for iPhone applications

Tags:

url

ios

iphone

I'd like to know if (and how) Apple guaranty the uniqueness of CFBundleURLSchemes entries for iPhone applications.

In the Apple documentation (http://developer.apple.com/library/ios/#documentation/iphone/conceptual/iphoneosprogrammingguide/StandardBehaviors/StandardBehaviors.html) section "Implementing custom URL Schemes") they say that about CFBundleURLName "To ensure uniqueness, it is recommended that you specify a reverse-DNS style of identifier", but nothing about CFBundleURLScheme. And when an application launches another application using an URL scheme, there is no reference to BundleURLName, it just refer to URL scheme. (method "- (BOOL)openURL:(NSURL *)url" of UIApplication).

So if I publish an application responding to a particular URL scheme on the app store, can I be sure that no other application responds to this URL scheme ? Is it a part of the Apple validation process ?

I have not be able to find any documentation about that neither on the Apple site nor on any other site.

like image 489
Sébastien Avatar asked Dec 15 '10 13:12

Sébastien


People also ask

What is URL scheme in iOS?

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.

Where is the URL scheme of iOS apps?

Finding an App's Main URL Scheme Name First, you have to download the IPA file for the app, which requires macOS and Apple Configurator 2. When you finally find the IPA, you have to turn it into a ZIP file, show the contents of the app package, then hunt for the specific PLIST file that contains the scheme names.

How do I add a custom URL scheme to my iOS app?

Register your URL schemeRegister your scheme in Xcode from the Info tab of your project settings. Update the URL Types section to declare all of the URL schemes your app supports, as shown in the following illustration. In the URL Schemes box, specify the prefix you use for your URLs.


1 Answers

No, as far as I know uniqueness of application URL schemes is not guaranteed by Apple - it only provides a recommendation that can significantly improve chances for that. If everyone will use recommended reverse dns style for their custom urls then they will not "collide" (assuming that company and application name combinations used for url are unique)

like image 159
Vladimir Avatar answered Oct 09 '22 10:10

Vladimir