handleATTAuthorizationStatus(trackingStatus: AppTrackingStatus) {
if (Capacitor.isNativePlatform() && this.platform.is('ios')) {
let status: BranchATTAuthorizationStatus;
// Convert the strings back to the correct integer value.
switch(trackingStatus) {
case 'authorized':
status = 3;
break;
case 'denied':
status = 2;
break;
case 'notDetermined':
status = 0;
break;
case 'restricted':
status = 1;
break;
}
BranchDeepLinks.handleATTAuthorizationStatus({status});
}
}
I have been in contact with support about this. This change is a merge of our working copy of the code with Branch's official code.
Reference
SDK-XXXX --
Summary
This patch adds ATT handling for iOS. It is already in the ReactNative version.
Motivation
Without this change, ATT prompt opt-in doesn't affect Branch.
Type Of Change
Testing Instructions
Pass in the results of the ATT prompt to the provided function.
Note that you'll either need to do the ATT prompt yourself or you'll need another package like
capacitor-plugin-app-tracking-transparency
Example:
I have been in contact with support about this. This change is a merge of our working copy of the code with Branch's official code.