react-native-branch-deep-linking-attribution icon indicating copy to clipboard operation
react-native-branch-deep-linking-attribution copied to clipboard

[INTENG-16718] Fixed LATD not being returned on iOS

Open nsingh-branch opened this issue 3 years ago • 2 comments
trafficstars

Reference

INTENG-16718 -- lastAttributedTouchData does not return the data at JS level

Summary

A client reported that they were not able to get the LATD in React Native iOS. We found that the server request was being made and the data was received, but the LATD would still return as undefined. This PR features a fix for that problem and adds error handling to the lastAttributedTouchData function.

Motivation

The issue was in RNBranch.m. The LATD data was being returned as BranchLastAttributedTouchData but needed to be resolved as BranchLastAttributedTouchData.lastAttributedTouchJSON.

Type Of Change

  • [x] Bug fix (non-breaking change which fixes an issue)

Testing Instructions

To test, make sure you have LATD available in your React Native iOS app by enabling the feature in the dashboard then opening a deeplink to your app. After that you should see your LATD in the request.

Then run the lastAttributedTouchData function and log the result. It should show the proper LATD data.

let latd = await branch.lastAttributedTouchData(attributionWindow)
console.log('Success - lastAttributedTouchData: ', latd)

nsingh-branch avatar Oct 06 '22 22:10 nsingh-branch

To test, can you describe how to have LATD available? I'm pretty unfamiliar with this api still.

gdeluna-branch avatar Oct 07 '22 06:10 gdeluna-branch

To test, can you describe how to have LATD available? I'm pretty unfamiliar with this api still.

Good call, i'll update the testing instructions.

nsingh-branch avatar Oct 07 '22 22:10 nsingh-branch