My requirement is to get the URI scheme out of the dynamic link URL that has been generated. Even in the firebase sample app, its the deep link url that gets returned and not the URI scheme.
For eg:
- Our dynamic link url is this -> https://my-app-code.app.goo.gl/value.
- iOS custom app scheme (added from advanced options): myappscheme://some-tag/some-tag-id
- Long dynamic link url is -> https://my-app-code.app.goo.gl/?link=my-web-url&apn=id&isi=android-google-play-id&ibi=ios-bundle-id&ius=ios-custom-app-scheme
When i click on the dynamic link url from email/notes (https://my-app-code.app.goo.gl/value), the callback will be the continueuseractivity function and i use the following block -
BOOL handled = [[FIRDynamicLinks dynamicLinks] handleUniversalLink:incomingUrl completion:^(FIRDynamicLink * _Nullable dynamicLink, NSError * _Nullable error)
to get the url (dynamicLink.url). In this block, i get the deep link url which is this
-> my-web-url (which is a part of the link parameter in the long dynamic link which i have mentioned above).
My actual requirement is to get the URI scheme myappscheme://some-tag/some-tag-id which associated with the URL. How do i get this?
I even tried the below -
FIRDynamicLink *dynamicLink = [[FIRDynamicLinks dynamicLinks] dynamicLinkFromCustomSchemeURL:url];
In either cases, I do not get the URI scheme.
Please help.
What you are trying to do is not currently possible on iOS with Dynamic Links. You are confusing URI scheme (
myappscheme://) with URI path (myappscheme://some-tag/some-tag-id).To my knowledge, Dynamic Links on iOS only support the scheme (via the
iusparam). This is confusing because Android does support a URI path (via thealparam). For iOS, you'll need to do your routing based on the deep link URL.Alternatively, you could investigate a more robust deep linking platform like Branch.io (full disclosure: I'm on the Branch team). Branch does support custom link parameters containing any data you wish, including a custom URI path.