Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(adjust): update wrapper for Adjust Cordova SDK v4.32.0 #4327

Merged
merged 1 commit into from
Oct 9, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions src/@awesome-cordova-plugins/plugins/adjust/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ export class AdjustConfig {
private allowAdServicesInfoReading: boolean = null; // iOS only
private coppaCompliantEnabled: boolean = null;
private playStoreKidsAppEnabled: boolean = null; // Android only
private linkMeEnabled: boolean = null; // iOS only

private attributionCallback: (attribution: AdjustAttribution) => void = null;
private eventTrackingSucceededCallback: (event: AdjustEventSuccess) => void = null;
Expand Down Expand Up @@ -169,6 +170,10 @@ export class AdjustConfig {
this.allowAdServicesInfoReading = allowAdServicesInfoReading;
}

setLinkMeEnabled(linkMeEnabled: boolean) {
this.linkMeEnabled = linkMeEnabled;
}

setAttributionCallbackListener(attributionCallback: (attribution: AdjustAttribution) => void) {
this.attributionCallback = attributionCallback;
}
Expand Down Expand Up @@ -330,6 +335,7 @@ export class AdjustPlayStoreSubscription {
export class AdjustThirdPartySharing {
private isEnabled: boolean;
private granularOptions: string[] = [];
private partnerSharingSettings: any[] = [];

constructor(isEnabled: boolean) {
this.isEnabled = isEnabled;
Expand All @@ -340,6 +346,12 @@ export class AdjustThirdPartySharing {
this.granularOptions.push(key);
this.granularOptions.push(value);
}

addPartnerSharingSetting(partnerName: string, key: string, value: boolean): void {
this.partnerSharingSettings.push(partnerName);
this.partnerSharingSettings.push(key);
this.partnerSharingSettings.push(value);
}
}

export class AdjustAdRevenue {
Expand Down Expand Up @@ -401,6 +413,7 @@ export interface AdjustAttribution {
costType: string;
costAmount: string;
costCurrency: string;
fbInstallReferrer: string; // Android only
}

export interface AdjustSessionSuccess {
Expand Down Expand Up @@ -792,4 +805,14 @@ export class Adjust extends AwesomeCordovaNativePlugin {
getAppTrackingAuthorizationStatus(): Promise<number> {
return;
}

/**
* To obtain the last deep link which has opened your iOS app, call this function
*
* @returns {Promise<string>} Returns a promise with iOS deep link string value
*/
@Cordova()
getLastDeeplink(): Promise<string> {
return;
}
}