Skip to content

Commit 706140d

Browse files
Merge pull request #745 from BranchMetrics/INTENG-16714
[INTENG-16718] Fixed LATD not being returned on iOS
2 parents 7991415 + 47467b8 commit 706140d

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

ios/RNBranch.m

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -394,9 +394,13 @@ - (BranchUniversalObject *)findUniversalObjectWithIdent:(NSString *)ident reject
394394
resolver:(RCTPromiseResolveBlock)resolve
395395
rejecter:(__unused RCTPromiseRejectBlock)reject
396396
) {
397-
[self.class.branch lastAttributedTouchDataWithAttributionWindow:window.integerValue completion:^(BranchLastAttributedTouchData *r, NSError *e){
398-
// TODO: pass back the error to JS
399-
resolve(r);
397+
[self.class.branch lastAttributedTouchDataWithAttributionWindow:window.integerValue completion:^(BranchLastAttributedTouchData *data, NSError *error){
398+
if (!error) {
399+
resolve(data.lastAttributedTouchJSON);
400+
} else {
401+
reject(@"RNBranch::Error::lastAttributedTouchData failed", error.localizedDescription, error);
402+
}
403+
400404
}];
401405
}
402406

0 commit comments

Comments
 (0)