I have several branch links that are meant to deeplink into my iOS app and pre-load an image into a UIImageView. They work properly when the app is installed, regardless of whether it's simply in the background or has been terminated. However, they do not work if the app is not already installed. They do properly link to the app store, but once the app is installed the parameters don't seem to flow through correctly.
I say the parameters don't SEEM to flow through, because I can't find a way to test this since I don't think there's any way to simulate a fresh app install via deeplink in Xcode. I know I can build from Xcode to my phone without the app automatically launching, then click the deeplink, but by that point the app is already installed on my phone so it defeats the purpose of the test. If anyone knows of a way to test app installs via deeplink I'd gladly take that information and run with it for a while...
Here's an example of a deep link that should load a graphic into a shirt design:
https://bnc.lt/l/5wGbOak_QW
Does anyone know of any known issues with Branch not sending data correctly post-install?
Edit: Here's what I've got in my appDelegate Branch code now. I can't prove that the url isn't getting set, but HomeViewController isn't downloading the linked image like it does for non-post-install launches. And like I mentioned before, I don't know how to simulate this situation since the Xcode simulator always installs first so I have no opportunity to simulate clicking the link pre-install.
let branch: Branch = Branch.getInstance()
branch.initSessionWithLaunchOptions(launchOptions, andRegisterDeepLinkHandler: { params, error in
if (error == nil) {
if let url = params["product_picture_url"] as? String {
let url = NSURL(string: url)!
HomeViewController.injectedImageUrl = url
}
}
})
Test Your Branch Integrationvalidate in your MainActivity's onStart(). Check your ADB Logcat to make sure all the SDK Integration tests pass. Make sure to comment out or remove IntegrationValidator. validate in your production build.
A Branch link is an actual page on the web. When users click a Branch link, they open that webpage, and we get pinged. We use matching to detect your users' device, operating system, and browser, and combine that with cookies to either remember or check whether they have the app installed.
Can you confirm that you're clicking the link prior to installing the app? Here's the test flow to cause the parameters to be passed through a fresh install:
If that doesn't work, here are some other troubleshooting suggestions:
Can you add logging to make sure that you've added initSession to the right delegate method which executes on first open. It should be in this delegate method:
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
Another common scenario is that the link could be created using the Test key, and you've got the Live key in your plist. Branch doesn't allow deep linking across from Test -> Live or visa versa. If you are unsure which key the link is associated with, you can append ?debug=true to the link (like https://bnc.lt/l/5wGbOak_QW?debug=true) after you've selected Test or Live on the dashboard to see the details. If you've selected the wrong key, it will say 'Link not found'. Otherwise, it will show the details of the links.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With