Firebase动态深层链接安装后无效 [英] Firebase dynamic deep link arrives nil after install

查看:536
本文介绍了Firebase动态深层链接安装后无效的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图使用Firebase将深层链接传递到我的应用程序中,以便安装。



为了测试这一点,我按照Firebase文档和Firecast在大约12分40秒处此处。步骤如下:


  1. 首先我从设备上删除应用程序。
  2. 然后我请按链接打开应用商店。
  3. 然后我从xcode运行我的应用程序。

  4. 预期:dynamicLink.url属性等于https://www.example.com/data/helloworldin application:openURL

  5. 现实:dynamicLink.url属性为零。

  6. ol>

    这是我在Firebase控制台中创建的深层链接网址: https ://nqze6app.goo.gl/RIl8



    这是传递到application:openURL之前被传递到dynamicLinkFromCustomSchemeURL:com.johnbogil



    <$>

    (NSURL *)url选项:(NSDictionary< NSString *,id> *)options {
    FIRDynamicLink * dynami cLink = [[FIRDynamicLinks dynamicLinks] dynamicLinkFromCustomSchemeURL:url];
    if(dynamicLink){
    NSLog(@我正在通过openURL方法处理链接);
    [self handleDynamicLink:dynamicLink];
    返回YES;
    } else {
    return NO;






    $ b

    不知道为什么dynamicLink.url到达零。任何援助表示赞赏。

    解决方案

    对于其他遇到同样错误的人...


    1. 如果您的 application:openURL 方法被调用,并且
    2. dynamicLinkFromCustomSchemeURL 方法中有效的 dynamicLink 对象,但
    3. url 该动态链接对象的参数为零

    然后再仔细检查一下在Safari中进入私人模式。这会让Firebase动态链接检索您点击的原始链接的功能变得混乱。

    I am attempting to use Firebase to pass deep links into my app that survive install.

    To test this I am following the steps provided by the Firebase documentation and Firecast video here at about the 12min 40s mark. The steps are as follows:

    1. First I delete the app from my device.
    2. Then I press the link to open the app store.
    3. Then I run my app from xcode.
    4. Expected: The dynamicLink.url property will be equal to "https: //www.example.com/data/helloworld" in application:openURL
    5. Reality: The dynamicLink.url property arrives nil.

    This is the deeplink url that I created in the Firebase console: https://nqze6app.goo.gl/RIl8

    This is the url that is passed into application:openURL prior to being passed into dynamicLinkFromCustomSchemeURL : com.johnbogil.voices://google/link/dismiss?fdl_cookie

    This is the code in my openURL call:

    - (BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary<NSString *,id> *)options { 
      FIRDynamicLink *dynamicLink = [[FIRDynamicLinks dynamicLinks] dynamicLinkFromCustomSchemeURL:url];
      if (dynamicLink) { 
        NSLog(@"I am handling a link through the openURL method"); 
        [self handleDynamicLink:dynamicLink]; 
        return YES; 
      } else { 
        return NO; 
      } 
    }
    

    Not sure why dynamicLink.url is arriving nil. Any assistance is appreciated.

    解决方案

    For anybody who else who's encountering this same error...

    1. If your application:openURL method is getting called, and
    2. You do seem to be getting a valid dynamicLink object from your dynamicLinkFromCustomSchemeURL method, but
    3. The url parameter of that dynamicLink object is nil

    Then double-check to see if you're in "Private" mode in Safari. That will kinda mess with Firebase Dynamic Links' ability to retrieve the original link that you clicked on.

    这篇关于Firebase动态深层链接安装后无效的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆