I'm creating a new UIDocument and think it would be beneficial for these theoretical use cases:
The OS should ensure that my app is the "owner" (no one should claim this type other than external UTI)
The end user to be redirected to a webpage or App Store if the app isn't installed.
Do Universal links provide any benefit to custom document types defined within info.plist?
Related
I have two apps under same firebase project, those share the same deep link
How are links handled by the OS if more than one App can use the same universal link? How do I choose the app that is going to be opened to handle certain pages?
for example, both apps share same universal link https://xxx.app.goo.gl
how will it be identified to open user or manager app?
According to Apple, this is dependent on the ordering of your AASA file.
The order of the dictionaries in the array determines the order the system follows when looking for a match, so you can specify an app to handle a particular part of your website.
The app that is listed first in the AASA file will take precedence. You can check that by looking at the AASA endpoint: https://xxx.app.goo.gl/apple-app-site-association
You can also specify certain paths to be handled separately, but if both apps share the same paths then the one listed first in the AASA will open.
I try to create on iOS an application like https://f-droid.org/packages/app.fedilab.nitterizeme/ on android to help a friend have the same feature (so it actually does not need to be an app per se)
i.e the user explicitly authorizes it to responds to twitter/youtube etc. links and redirect them to non-tracking frontend or app (nitter.net etc. )
However my understanding is that Apple requires the app to put a special file on the domain to prove ownership.
Is there a way to workaround that if the user gives his explicit consent ?
No, there is no workaround for that
I've been doing a fair amount of research on universal links, handoff and associated domains on iOS. However, a lot of the documentation does go in depth of what is really happening under the hood with regards to associated domains (Well I couldn't find the documentation).
Here is what I understand so far:
Based the Universal Links, Hand off and Sharing web credentials documentation we have the following format when it comes to an associated domain:
<service>:<fully qualified domain>[:port number]
So when using universal links, the service isapplinks. When using hand off the service is activitycontinuation. When sharing of web credentials the service is webcredentials.
Whenever an app is downloaded theapple-app-site-association file is downloaded and stored on the phone and a registry is kept. For example lets work now with Universal Links.
Lets say my app in its associated domains section registers: applinks:com.example. Now lets say that when I get a link in an email that is www.example.com and I press this, I assume that the OS on the phone first checks the registry of all the applinks saved on the device and because a given app registers to com.example it then simply routes the URL to the given app that registered the com.example associated domain.
Question 1:Is this intuition correct?
If this is the case, I can't see any issue as a developer by creating my own web service i.e. mySpecialService:<Some-Domain> and in my apple-app-site-association file have something like:
{
"mySpecialService": {
"apps": [ "D3KQX62K1A.com.example.DemoApp",
"D3KQX62K1A.com.example.DemoAdminApp" ]
}
}
Question 2: Can developers create their own associated domain services? Or are associated domain services reserved by Apple?
We use an LMS calles Canvas by instructure. Our students access the LMS via the iOS app, however we would like to be able to call out from this app to another app (e-book reader).
We just want to be able to select a link which will redirect us to the app.
We have a coder in our staff, and we would really appreciate any advise on how to achieve the above.
You can communicate with URL Schemes between apps Apple Inter-App Communication
And here is Tutorial explaining URL Schemes implementation.
If you have access to the e-book reader app's codebase, this is simple to achieve by specifying a URL Scheme this app may respond to (or, alternatively, if you happen to know what URL Schemes this app supports). Then it will be as simple as calling out a URL of a corresponding format from within the iOS app your students use.
Alternatively, if your app provides access to the documents of some sort, you could look into UIDocumentInteractionController that can add "Open in..." functionality to your app, allowing app users to open a document in an arbitrary app that supports this file format.
is it possible to access the icon specified with CFBundleURLIconFile in the info.plist file from a different application? Does application sandboxing prevent it? If so,what is the purpose of this key(in an iOS app of course)?
Thanks
As stated in CoreFoundationKeys docs: "CFBundleURLTypes contains an array of dictionaries, each of which describes the URL schemes (http, ftp, and so on) supported by the application. The purpose of this key is similar to that of “CFBundleDocumentTypes,” but it describes URL schemes instead of document types."
The purpose is to permit applications to register for some type of documents allowing an app to handle the opening of files from other installed app (you surely met the "Open In..." button, for example in Mail when you receive a file).
More on this in the Document Interaction Programming Topics for iOS.
EDIT:
Sorry, I forgot to answer to your main question: AFAIK the only way to access that key is through UIDocumentInteractionController.