When defining the custom URL scheme for my app there are 3 keys that I need information about:
CFBundleTypeRole
aka Document Role CFBundleURLName
aka URL identifier CFBundleURLSchemes
aka URL Schemes I can see, if I just define CFBundleURLSchemes
to be myapp
the app is launching fine with an URL as myapp://
. Questions are:
myapp
defined in 2 apps, and I call myapp://
can I specify which one I want to call by calling myapp://<URL Identifier>
? Edit: What does this URL Identifier actually do? Does it only give a name to url? How it is used? None, Viewer or Editor,
I am not sure what level of permission my app has on the launched app as I have not defined anything. I would like to know what is the default permission when the CFBundleTypeRole
is not defined. A protocol is not guaranteed to be unique. There is no parameter you can define that will open app1 or app2. If two apps use the same scheme it is undefined what happens
the role is irrelevant for the most part BUT mandatory :
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.
Also if more than one app specify the same url scheme, then the outcome is unpredictable.
See URL identifier and URL scheme
The Role flag isn't used by iOS.
See In Xcode, under Info tab, what's Role for in URL Types section?
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.