Trying to set up branch for deep linking. In settings
for the Branch control panel the link domain is set to: get.myapp.co
. For iOS the URI Scheme is: myapp://
. Under the Associated Domains section of entitlements
I have:
applinks:get.myapp.co
applinks:get-alternate.myapp.co
I have my AppDelegate.swift
setup as described by the guide.
func application(_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
let branch = Branch.getInstance()
branch?.initSession(launchOptions: launchOptions) { (params, error) in
//We can handle links when an app is launched/open here
if let error = error {
print("Branch error: \(error.localizedDescription)", logType: .Error)
} else {
print("Branch params: \(params.description)")
}
}
}
Now I have a marketing ink setup in the control panel with the key: redirect
and value subscription
. When I tap on the link I output I get is:
Branch params: [AnyHashable("+clicked_branch_link"): 0, AnyHashable("+is_first_session"): 0, AnyHashable("+non_branch_link"): http://get.myapp.co/xmas-special-offer]
So +clicked_branch_link
is 0. My metadata with the key redirect
is also missing. What am I doing wrong here?
EDIT:
Note I was pasting the link from the control panel into an email and then opening it from the mail app, this doesn't work. BUT if I send the link from the control panel via sms the metadata appears and clicked_branch_link
is 1. What gives?