This is the situation: if I click one of the links that I have with custom key/values associated with it, my callback from initSessionWithLaunchOptions:andRegisterDeepLinkHandler
is being triggered ok, but ‘params’ only contain the custom key/values in the case the app is fresh opened from the link. In the case the app was already running in background and I click the link, the callback is called but no parameters are present. This was working a few weeks ago and now seems to stop working. I tried upgrading to iOS SDK 0.12.1 too but no luck yet.
As a workaround, I’m trying doing a delayed sequence of calls to Branch.getInstance().getLatestReferringParams()
after the app becomes active and sometimes I’m getting the parameters from there, but it’s not deterministic, sometimes it takes 2 seconds, sometimes 10 seconds, sometimes never.
@AlexBauer Here's the parts of the app delegate. Btw, I don't have facebook integration in the app:
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
let branch: Branch = Branch.getInstance()
branch.initSessionWithLaunchOptions(launchOptions, andRegisterDeepLinkHandler: { params, error in
if (error == nil) {
print(params)
self.tryInviteFlow(params)
} else {
print(error.localizedDescription)
}
})
}
func application(application: UIApplication, continueUserActivity userActivity: NSUserActivity, restorationHandler: ([AnyObject]?) -> Void) -> Bool {
// pass the url to the handle deep link call
return Branch.getInstance().continueUserActivity(userActivity);
}