react-native-branch-deep-linking-attribution
react-native-branch-deep-linking-attribution copied to clipboard
[INTENG-16718] Fixed LATD not being returned on iOS
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)
To test, can you describe how to have LATD available? I'm pretty unfamiliar with this api still.
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.