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.37.1 #4724

Merged
merged 1 commit into from
Apr 17, 2024
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
51 changes: 40 additions & 11 deletions src/@awesome-cordova-plugins/plugins/adjust/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,13 @@ export class AdjustConfig {
private processName: string = null; // Android only
private preinstallTrackingEnabled: boolean = null; // Android only
private preinstallFilePath: string = null; // Android only
private fbAppId: string = null; // Android only
private oaidReadingEnabled: boolean = null; // Android only
private allowiAdInfoReading: boolean = null; // iOS only
private allowIdfaReading: boolean = null; // iOS only
private allowAdServicesInfoReading: boolean = null; // iOS only
private coppaCompliantEnabled: boolean = null;
private readDeviceInfoOnceEnabled: boolean = null;
private playStoreKidsAppEnabled: boolean = null; // Android only
private linkMeEnabled: boolean = null; // iOS only
private finalAndroidAttributionEnabled: boolean = null; // Android only
Expand Down Expand Up @@ -144,6 +146,10 @@ export class AdjustConfig {
this.coppaCompliantEnabled = coppaCompliantEnabled;
}

setReadDeviceInfoOnceEnabled(readDeviceInfoOnceEnabled: boolean) {
this.readDeviceInfoOnceEnabled = readDeviceInfoOnceEnabled;
}

setPlayStoreKidsAppEnabled(playStoreKidsAppEnabled: boolean) {
this.playStoreKidsAppEnabled = playStoreKidsAppEnabled;
}
Expand Down Expand Up @@ -172,6 +178,10 @@ export class AdjustConfig {
this.preinstallFilePath = preinstallFilePath;
}

setFbAppId(fbAppId: string) {
this.fbAppId = fbAppId;
}

setOaidReadingEnabled(enableOaidReading: boolean) {
this.oaidReadingEnabled = enableOaidReading;
}
Expand Down Expand Up @@ -230,9 +240,7 @@ export class AdjustConfig {
this.conversionValueUpdatedCallback = conversionValueUpdatedCallback;
}

setSkad4ConversionValueUpdatedCallbackListener(
skad4ConversionValueUpdatedCallback: (skad4Data: AdjustSkad4Data) => void
) {
setSkad4ConversionValueUpdatedCallbackListener(skad4ConversionValueUpdatedCallback: (skad4Data: AdjustSkad4Data) => void) {
this.skad4ConversionValueUpdatedCallback = skad4ConversionValueUpdatedCallback;
}

Expand Down Expand Up @@ -543,6 +551,7 @@ export enum AdjustUrlStrategy {
India = 'india',
China = 'china',
Cn = 'cn',
CnOnly = 'cn-only',
DataResidencyEU = 'data-residency-eu',
DataResidencyTR = 'data-residency-tr',
DataResidencyUS = 'data-residency-us',
Expand All @@ -553,10 +562,12 @@ export enum AdjustAdRevenueSource {
AdRevenueSourceMopub = 'mopub',
AdRevenueSourceAdMob = 'admob_sdk',
AdRevenueSourceIronSource = 'ironsource_sdk',
AdRevenueSourceAdMost = 'admost_sdk',
AdRevenueSourceUnity = 'unity_sdk',
AdRevenueSourceHeliumChartboost = 'helium_chartboost_sdk',
AdRevenueSourcePublisher = 'publisher_sdk',
AdRevenueSourceAdMost = "admost_sdk",
AdRevenueSourceUnity = "unity_sdk",
AdRevenueSourceHeliumChartboost = "helium_chartboost_sdk",
AdRevenueSourcePublisher = "publisher_sdk",
AdRevenueSourceTopOn = "topon_sdk",
AdRevenueSourceAdx = "adx_sdk",
}

/**
Expand Down Expand Up @@ -612,6 +623,7 @@ export enum AdjustAdRevenueSource {
})
@Injectable()
export class Adjust extends AwesomeCordovaNativePlugin {

/**
* This method initializes Adjust SDK
*
Expand Down Expand Up @@ -730,7 +742,7 @@ export class Adjust extends AwesomeCordovaNativePlugin {
gdprForgetMe(): void {}

/**
* You can now notify Adjust when a user has exercised their right to stop sharing their data with partners for marketing purposes, but has allowed it to be shared for statistics purposes.
* You can now notify Adjust when a user has exercised their right to stop sharing their data with partners for marketing purposes, but has allowed it to be shared for statistics purposes.
* Calling the following method will instruct the Adjust SDK to communicate the user's choice to disable data sharing to the Adjust backend
*/
@Cordova({ sync: true })
Expand Down Expand Up @@ -898,15 +910,32 @@ export class Adjust extends AwesomeCordovaNativePlugin {
* This method is used to verify the App Store purchase
*
* @param {AdjustAppStorePurchase} purchase Adjust App Store purchase object to be verified
* @returns {Promise<AdjustPurchaseVerificationInfo>} Returns a promise with purchase verification outcome
*/
@Cordova()
verifyAppStorePurchase(purchase: AdjustAppStorePurchase): Promise<AdjustPurchaseVerificationInfo> {}
verifyAppStorePurchase(purchase: AdjustAppStorePurchase): Promise<AdjustPurchaseVerificationInfo> {
return;
}

/**
* This method is used to verify the Play Store purchase
*
* @param {AdjustPlayStorePurchase} purchase Adjust Play Store purchase object to be verified
* @returns {Promise<AdjustPurchaseVerificationInfo>} Returns a promise with purchase verification outcome
*/
@Cordova()
verifyPlayStorePurchase(purchase: AdjustPlayStorePurchase): Promise<AdjustPurchaseVerificationInfo> {}
}
verifyPlayStorePurchase(purchase: AdjustPlayStorePurchase): Promise<AdjustPurchaseVerificationInfo> {
return;
}

/**
* This method is used to send and potentially resolve shortened deep links
*
* @param {string} deeplink Potentially shortened deep link that has opened your app
* @returns {Promise<string>} Returns a promise with either resolved (if it was resolved) or echoed deep link
*/
@Cordova()
processDeeplink(deeplink: string): Promise<string> {
return;
}
}