Firebase Deep linking for iOS is not giving url for iOS version 9.0 and above.

1,210 views
Skip to first unread message

Gaurav Shishodia

unread,
Sep 26, 2016, 10:52:10 AM9/26/16
to Firebase Google Group
I have tried every thing but I am not able get the value of url property of FIRDynamicLink class. Although I am able to access the value of FIRDynamicLinkMatchConfidence as weak.
For integration I have followed the https://firebase.google.com/docs/dynamic-links/ios link.
But for iOS version less than 9.0 I am successfully able to access the required values.
The test dynamic link is https://wz9p3.app.goo.gl/o5yr
I am successfully able to get the required values in  https://wz9p3.app.goo.gl/apple-app-site-association. This means my app in successfully linked with the dashboard.

My implementation is as follows :

- (BOOL)application:(UIApplication *)application continueUserActivity:(nonnull NSUserActivity *)userActivity restorationHandler:(nonnull void (^)(NSArray * _Nullable))restorationHandler {

    NSLog(@"%@", userActivity.webpageURL);

    __weak AppDelegate *weakSelf = self;


    BOOL handled = [[FIRDynamicLinks dynamicLinks]

                    handleUniversalLink:userActivity.webpageURL

                    completion:^(FIRDynamicLink * _Nullable dynamicLink,

                                 NSError * _Nullable error) {

                        AppDelegate *strongSelf = weakSelf;

                        [strongSelf handleReceivedLink:dynamicLink];

                   }];

return handled;


}


-(void)handleReceivedLink:(FIRDynamicLink*)dynamicLink{

    NSString* urlString = [NSString stringWithFormat:@"%@",dynamicLink.url];

    NSLog(@"Extended URL : %@",urlString); // this is giving nil value

}


The urlString is giving nil value. 

Please verify and tell me what am I doing wrong as I have spent sufficient amount of on this issue.

Thanks,
Gaurav


This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to which they are addressed. If you have received it by mistake, please let us know by e-mail reply and delete it from your system.  Any unauthorized copying, disclosure or distribution of this e-mail, or the material in this e-mail is strictly prohibited. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of OneAssist. E-mail transmission cannot be guaranteed to be secured or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message, which arise as a result of e-mail transmission.


 

Kavitha Pai

unread,
Sep 28, 2016, 10:38:10 AM9/28/16
to Firebase Google Group
I am facing exactly the same issue.

Joe Robb

unread,
Sep 28, 2016, 6:30:59 PM9/28/16
to Firebase Google Group
I'm seeing a similar issue.

Ian Barber

unread,
Sep 30, 2016, 4:37:47 PM9/30/16
to Firebase Google Group
Have you defined a custom URL scheme? For example (I think) a custom URL type of "com.oneAssist.oneAssist" for the first app. If you have a different one defined, you can set that up as a parameter in the dynamic link console too.

It is used in the link resolution process, and I think it might be causing the links to get dropped.

Joe Robb

unread,
Sep 30, 2016, 8:31:01 PM9/30/16
to Firebase Google Group
Ian, thanks for the response.

We have, and that wasn't the issue. We passed it onto the Firebase support team and they're looking at it now. We haven't gotten a response yet though. If we hear anything back, I'll be sure to update this thread.

Artem Lagzdin

unread,
Oct 3, 2016, 1:57:16 PM10/3/16
to Firebase Google Group
Hi,

We've been facing the same issue. Firebase support wrote about a week ago too that they had received multiple reports about this bug and had been investigating it. I successfully tested exactly the same implementation about a month ago so the problem appears on their side for sure.

суббота, 1 октября 2016 г., 6:31:01 UTC+6 пользователь Joe Robb написал:

Ian Barber

unread,
Oct 3, 2016, 2:02:10 PM10/3/16
to Firebase Google Group
So just to confirm - adding the custom URL scheme matching the bundle ID didn't resolve the problem for you?

Artem Lagzdin

unread,
Oct 4, 2016, 11:03:23 AM10/4/16
to Firebase Google Group
No it doesn't.
The short URL is passed to the application OK, but here in the completion handler

[[FIRDynamicLinks dynamicLinkshandleUniversalLink:userActivity.webpageURL                  completion:^(FIRDynamicLink * _Nullable dynamicLink, NSError * _Nullable error) { NSLog(@"%@, dynamicLink"); }];

the dynamicLink is nil. Moreover, if we pass long URL, completion handler returns correct dynamic link. I believe that's because for long URLs the framework splits all parameters on client-side and in case of short URL it asks the Firebase server to expand the short URL.

вторник, 4 октября 2016 г., 0:02:10 UTC+6 пользователь Ian Barber написал:

Ian Barber

unread,
Oct 4, 2016, 6:24:09 PM10/4/16
to Firebase Google Group
Interesting - I was asking about the URL scheme as it is a validation step when resolving the short link, not because its used in actually receiving the link. 

Would you be comfortable sharing an example of a short link that isn't working? 

Artem Lagzdin

unread,
Oct 14, 2016, 6:09:13 AM10/14/16
to Firebase Google Group
It works now, short URLs are resolved to dynamic links via handleUniversalLink OK.

среда, 5 октября 2016 г., 4:24:09 UTC+6 пользователь Ian Barber написал:
Reply all
Reply to author
Forward
0 new messages