如果应用已关闭,则Firebase动态链接不起作用 [英] Firebase Dynamic Link not working if app is CLOSED

查看:83
本文介绍了如果应用已关闭,则Firebase动态链接不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Firebase动态链接在安装后以及应用程序在后台时均能正常工作.

Firebase dynamic links are working well both after installation and whenever the app is in the background.

但是,如果它来自非活动状态(应用程序已关闭),则它不起作用.不会同时调用applicationOpenURL和applicationUserActivity.

However, if it's coming from the inactive state (app is closed), it doesn't work. Both applicationOpenURL and applicationUserActivity is not being called.

有人以前经历过吗?几天来,我一直在尝试解决这些问题,使用Firebase的教程来回解决.我确定我只是在这里遗漏了一些东西.

Anybody experienced this before? I've been trying to solve this for days now, back and forth with Firebase's tutorial. I'm sure I'm just missing something here.

推荐答案

将其放在didFinishLaunchingWithOptions

Put this in didFinishLaunchingWithOptions

//Handle dynamic links when app is CLOSED
    let activityDic = launchOptions?[.userActivityDictionary]
    if let isActivityDic = activityDic {
        // Continue activity here
        return true
    }

如果从CLOSED状态打开应用,它将调用continue userActivity.

it will call continue userActivity if the app is opened from CLOSED state.

这篇关于如果应用已关闭,则Firebase动态链接不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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