Firebase Dynamic Link not working if app is CLOSED

馋奶兔 提交于 2019-12-07 19:27:02

问题


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

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

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.


回答1:


Put this in didFinishLaunchingWithOptions

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

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



来源:https://stackoverflow.com/questions/42868622/firebase-dynamic-link-not-working-if-app-is-closed

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!