i have used custom URL scheme in my Application to open it from another Application(which may be my Own).suppose more than one Application in App store may have The URL Identifier i used.if user has two Application with same URL Scheme, what will open? will Custom URL Application be approved by apple?
Custom URL apps are accepted by Apple. However if multiple apps on the device have registered same URL scheme then the behavior is undefined. From iOS Application Programming Guide, "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."
Short answer: First app to register URL will sometimes open but it will fail to open often. Other times second app to register will open but fail often. Basically it fails a lot and really is "undefined". Use http://handleopenurl.com/ to avoid.
Long Answer:
I created two apps, FirstApp and SecondApp, and registered the same URL testURL
for both.
I loaded FirstApp and the URL worked as expected, opening the app.
I then loaded SecondApp and the dreaded undefined behavior started occurring. Currently, under iOS 7, if two apps have the same custom URL registered it pops up a modal asking
Open this page in "Name of First App"?
When you tap the Open option it fails, and nothing happens. If you tap or enter the link again the first app installed with that URL, in our case FirstApp, will launch.
So in effect, the second app to register never gets opened, and the first app fails every two URL calls. No ideal behavior.
What makes it even worse is I deleted both apps and then switched the order I installed them and the results are not consistent. Sometimes it is one app, then on reloading both apps it is the other. The behavior really is "undefined".
Best practice is to use http://handleopenurl.com/ to see what URLs have been registered and chose one that will not conflict with other apps. You can't "steal" another URL because you can't be sure your app will open and not the other app.
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