phage04
phage04

Reputation: 321

Firebase Dynamic Link not working if app is CLOSED

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.

Upvotes: 2

Views: 2089

Answers (1)

phage04
phage04

Reputation: 321

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.

Upvotes: 3

Related Questions