@capgo/capacitor-appsflyer 8.1.20 → 9.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -11,7 +11,7 @@ Pod::Spec.new do |s|
11
11
  s.source = { :git => package['repository']['url'], :tag => s.version.to_s }
12
12
  s.source_files = 'ios/Sources/AppsFlyerPlugin/**/*.{swift}'
13
13
  s.static_framework = true
14
- s.ios.deployment_target = '15.0'
14
+ s.ios.deployment_target = '16.0'
15
15
  s.dependency 'Capacitor'
16
16
  s.swift_version = '5.9'
17
17
 
package/Package.swift CHANGED
@@ -3,22 +3,21 @@ import PackageDescription
3
3
 
4
4
  let package = Package(
5
5
  name: "CapgoCapacitorAppsflyer",
6
- platforms: [.iOS(.v15)],
6
+ platforms: [.iOS(.v16)],
7
7
  products: [
8
8
  .library(
9
9
  name: "CapgoCapacitorAppsflyer",
10
10
  targets: ["AppsFlyerPlugin"])
11
11
  ],
12
12
  dependencies: [
13
- .package(url: "https://github.com/ionic-team/capacitor-swift-pm.git", from: "8.0.0"),
13
+ .package(url: "https://github.com/ionic-team/capacitor.git", from: "9.0.0"),
14
14
  .package(url: "https://github.com/AppsFlyerSDK/AppsFlyerFramework-Static.git", from: "6.17.0")
15
15
  ],
16
16
  targets: [
17
17
  .target(
18
18
  name: "AppsFlyerPlugin",
19
19
  dependencies: [
20
- .product(name: "Capacitor", package: "capacitor-swift-pm"),
21
- .product(name: "Cordova", package: "capacitor-swift-pm"),
20
+ .product(name: "Capacitor", package: "capacitor"),
22
21
  .product(name: "AppsFlyerLib-Static", package: "AppsFlyerFramework-Static")
23
22
  ],
24
23
  path: "ios/Sources/AppsFlyerPlugin"),
package/README.md CHANGED
@@ -18,12 +18,12 @@ Add AppsFlyer attribution, in-app event tracking and deep linking to your Capaci
18
18
 
19
19
  ## Built and maintained with AI
20
20
 
21
- We build, improve and fix our plugins with heavy use of AI, so issues usually get fixed in under a day and pull requests get feedback the same day. A human still reviews and merges 50+ pull requests daily.
21
+ We build, improve and fix our plugins with heavy use of AI, so issues usually get fixed in under a day and pull requests get feedback the same day. A human still reviews, tests and merges 50+ pull requests daily.
22
22
 
23
23
  - Most plugin issues get a fix pull request the same day, often within a couple of hours, and are usually resolved in one to two days.
24
24
  - Every pull request goes through our AI review system, usually within minutes.
25
- - Our AI pre-checks tests, code review, conventions and security, then a human validates and merges.
26
- - A human, Martin, reviews and merges 50+ pull requests every day.
25
+ - Our AI pre-checks tests, code review, conventions and security, then a human reviews, tests and merges.
26
+ - A human, Martin, reviews, tests and merges 50+ pull requests every day.
27
27
  - In the last 90 days, 95% of plugin issues were resolved.
28
28
 
29
29
  [Learn more about how we build with AI](https://capgo.app/docs/plugins/ai-engineering/)
@@ -37,7 +37,7 @@ We build, improve and fix our plugins with heavy use of AI, so issues usually ge
37
37
  - **Device ID**: `getAppsFlyerUID()` returns the AppsFlyer install ID.
38
38
  - **Platforms**: iOS and Android. Uses the official AppsFlyer SDKs. No web implementation.
39
39
 
40
- AppsFlyer attribution and deep-linking support for Capacitor 8 apps, packaged in Capgo's plugin layout with CocoaPods and Swift Package Manager support.
40
+ AppsFlyer attribution and deep-linking support for Capacitor 9 apps, packaged in Capgo's plugin layout with CocoaPods and Swift Package Manager support.
41
41
 
42
42
  This package is based on the official AppsFlyer Capacitor plugin and the Capacitor 8 / SPM update work from [AppsFlyerSDK/appsflyer-capacitor-plugin#185](https://github.com/AppsFlyerSDK/appsflyer-capacitor-plugin/pull/185).
43
43
 
@@ -51,10 +51,28 @@ The most complete doc is available here: https://capgo.app/docs/plugins/appsflye
51
51
 
52
52
  | Plugin version | Capacitor compatibility | Maintained |
53
53
  | -------------- | ----------------------- | ---------- |
54
- | v8.*.* | v8.*.* | ✅ |
54
+ | v9.*.* | v9.*.* | ✅ |
55
+ | v8.*.* | v8.*.* | On demand |
55
56
 
56
57
  > **Note:** The major version of this plugin follows the major version of Capacitor. Use the version that matches your Capacitor installation.
57
58
 
59
+ ## Migrating from v8 to v9
60
+
61
+ v9 of `@capgo/capacitor-appsflyer` targets Capacitor 9. Update Capacitor and this plugin together, then sync the native projects:
62
+
63
+ ```bash
64
+ npm install @capacitor/core@^9.0.0 @capacitor/cli@^9.0.0 @capacitor/ios@^9.0.0 @capacitor/android@^9.0.0 @capgo/capacitor-appsflyer@^9.0.0
65
+ npx cap sync
66
+ ```
67
+
68
+ Capacitor 9 needs Node.js 24+, iOS 16+ (Xcode 27) and Android minSdk 26 / compileSdk 37. Follow the official [Capacitor 9 update guide](https://capacitorjs.com/docs/updating/9-0) for the app side changes.
69
+
70
+ APIs that were deprecated in v8 are removed in v9:
71
+
72
+ - `setSharingFilter()` and `setSharingFilterForAllPartners()`: use `setSharingFilterForPartners()`.
73
+ - `validateAndLogInAppPurchaseAndroid()` and `validateAndLogInAppPurchaseIos()`: use `validateAndLogInAppPurchaseV2()`.
74
+ - `setConsentData()`: use `setConsentDataV2()`.
75
+
58
76
  ## Install
59
77
 
60
78
  You can use our AI-Assisted Setup to install the plugin. Add the Capgo skills to your AI tool using the following command:
@@ -119,8 +137,6 @@ Call `initSDK()` as early as possible during app startup. Use `manualStart: true
119
137
  * [`appendParametersToDeepLinkingURL(...)`](#appendparameterstodeeplinkingurl)
120
138
  * [`setResolveDeepLinkURLs(...)`](#setresolvedeeplinkurls)
121
139
  * [`addPushNotificationDeepLinkPath(...)`](#addpushnotificationdeeplinkpath)
122
- * [`setSharingFilter(...)`](#setsharingfilter)
123
- * [`setSharingFilterForAllPartners()`](#setsharingfilterforallpartners)
124
140
  * [`setSharingFilterForPartners(...)`](#setsharingfilterforpartners)
125
141
  * [`setAdditionalData(...)`](#setadditionaldata)
126
142
  * [`getAppsFlyerUID()`](#getappsflyeruid)
@@ -131,8 +147,6 @@ Call `initSDK()` as early as possible during app startup. Use `manualStart: true
131
147
  * [`disableCollectASA(...)`](#disablecollectasa)
132
148
  * [`setHost(...)`](#sethost)
133
149
  * [`generateInviteLink(...)`](#generateinvitelink)
134
- * [`validateAndLogInAppPurchaseAndroid(...)`](#validateandloginapppurchaseandroid)
135
- * [`validateAndLogInAppPurchaseIos(...)`](#validateandloginapppurchaseios)
136
150
  * [`getSdkVersion()`](#getsdkversion)
137
151
  * [`enableFacebookDeferredApplinks(...)`](#enablefacebookdeferredapplinks)
138
152
  * [`sendPushNotificationData(...)`](#sendpushnotificationdata)
@@ -145,7 +159,6 @@ Call `initSDK()` as early as possible during app startup. Use `manualStart: true
145
159
  * [`logInvite(...)`](#loginvite)
146
160
  * [`setDisableNetworkData(...)`](#setdisablenetworkdata)
147
161
  * [`enableTCFDataCollection(...)`](#enabletcfdatacollection)
148
- * [`setConsentData(...)`](#setconsentdata)
149
162
  * [`logAdRevenue(...)`](#logadrevenue)
150
163
  * [`setConsentDataV2(...)`](#setconsentdatav2)
151
164
  * [`isSDKStarted()`](#issdkstarted)
@@ -381,32 +394,6 @@ Configures how the SDK extracts deep link values from push notification payloads
381
394
  --------------------
382
395
 
383
396
 
384
- ### setSharingFilter(...)
385
-
386
- ```typescript
387
- setSharingFilter(filters: AFFilters) => Promise<void>
388
- ```
389
-
390
- Stops events from propagating to the specified AppsFlyer partners.
391
-
392
- | Param | Type |
393
- | ------------- | ----------------------------------------------- |
394
- | **`filters`** | <code><a href="#affilters">AFFilters</a></code> |
395
-
396
- --------------------
397
-
398
-
399
- ### setSharingFilterForAllPartners()
400
-
401
- ```typescript
402
- setSharingFilterForAllPartners() => Promise<void>
403
- ```
404
-
405
- Stops events from propagating to all AppsFlyer partners. Overwrites setSharingFilter.
406
-
407
- --------------------
408
-
409
-
410
397
  ### setSharingFilterForPartners(...)
411
398
 
412
399
  ```typescript
@@ -560,38 +547,6 @@ Allowing your existing users to invite their friends and contacts as new users t
560
547
  --------------------
561
548
 
562
549
 
563
- ### validateAndLogInAppPurchaseAndroid(...)
564
-
565
- ```typescript
566
- validateAndLogInAppPurchaseAndroid(purchaseData: AFAndroidInAppPurchase) => Promise<AFRes>
567
- ```
568
-
569
- API for server verification of in-app purchases. An af_purchase event with the relevant values will be automatically logged if the validation is successful.
570
-
571
- | Param | Type |
572
- | ------------------ | ------------------------------------------------------------------------- |
573
- | **`purchaseData`** | <code><a href="#afandroidinapppurchase">AFAndroidInAppPurchase</a></code> |
574
-
575
- **Returns:** <code>Promise&lt;<a href="#afres">AFRes</a>&gt;</code>
576
-
577
- --------------------
578
-
579
-
580
- ### validateAndLogInAppPurchaseIos(...)
581
-
582
- ```typescript
583
- validateAndLogInAppPurchaseIos(purchaseData: AFIosInAppPurchase) => Promise<AFRes>
584
- ```
585
-
586
- | Param | Type |
587
- | ------------------ | ----------------------------------------------------------------- |
588
- | **`purchaseData`** | <code><a href="#afiosinapppurchase">AFIosInAppPurchase</a></code> |
589
-
590
- **Returns:** <code>Promise&lt;<a href="#afres">AFRes</a>&gt;</code>
591
-
592
- --------------------
593
-
594
-
595
550
  ### getSdkVersion()
596
551
 
597
552
  ```typescript
@@ -788,22 +743,6 @@ Flag value will be persisted between app sessions.
788
743
  --------------------
789
744
 
790
745
 
791
- ### setConsentData(...)
792
-
793
- ```typescript
794
- setConsentData(data: AFConsentData) => Promise<void>
795
- ```
796
-
797
- Use to set user consent data manualy.
798
- if your app doesn't use a CMP compatible with TCF v2.2, use the following method to manualy provide the consent data directly to the SDK.
799
-
800
- | Param | Type | Description |
801
- | ---------- | ------------------------------------------------------- | -------------------------- |
802
- | **`data`** | <code><a href="#afconsentdata">AFConsentData</a></code> | : AppsFlyerConsent object. |
803
-
804
- --------------------
805
-
806
-
807
746
  ### logAdRevenue(...)
808
747
 
809
748
  ```typescript
@@ -1102,25 +1041,6 @@ An af_purchase event with the relevant values will be automatically logged if th
1102
1041
  | **`addParameters`** | <code><a href="#stringmap">StringMap</a></code> |
1103
1042
 
1104
1043
 
1105
- #### AFAndroidInAppPurchase
1106
-
1107
- | Prop | Type |
1108
- | ------------------ | ------------------- |
1109
- | **`publicKey`** | <code>string</code> |
1110
- | **`signature`** | <code>string</code> |
1111
- | **`purchaseData`** | <code>string</code> |
1112
- | **`price`** | <code>string</code> |
1113
-
1114
-
1115
- #### AFIosInAppPurchase
1116
-
1117
- | Prop | Type |
1118
- | ------------------- | ------------------- |
1119
- | **`inAppPurchase`** | <code>string</code> |
1120
- | **`price`** | <code>string</code> |
1121
- | **`transactionId`** | <code>string</code> |
1122
-
1123
-
1124
1044
  #### AFFbDAL
1125
1045
 
1126
1046
  | Prop | Type |
@@ -1197,22 +1117,6 @@ An af_purchase event with the relevant values will be automatically logged if th
1197
1117
  | **`shouldEnableTCFDataCollection`** | <code>boolean</code> |
1198
1118
 
1199
1119
 
1200
- #### AFConsentData
1201
-
1202
- | Prop | Type |
1203
- | ---------- | --------------------------------------------------------------- |
1204
- | **`data`** | <code><a href="#iappsflyerconsent">IAppsFlyerConsent</a></code> |
1205
-
1206
-
1207
- #### IAppsFlyerConsent
1208
-
1209
- | Prop | Type |
1210
- | ------------------------------------- | -------------------- |
1211
- | **`isUserSubjectToGDPR`** | <code>boolean</code> |
1212
- | **`hasConsentForDataUsage`** | <code>boolean</code> |
1213
- | **`hasConsentForAdsPersonalization`** | <code>boolean</code> |
1214
-
1215
-
1216
1120
  #### AFAdRevenueData
1217
1121
 
1218
1122
  | Prop | Type |
@@ -103,37 +103,34 @@ def getPackageJson() {
103
103
  ext {
104
104
  packageJson = getPackageJson()
105
105
 
106
- junitVersion = project.hasProperty('junitVersion') ? rootProject.ext.junitVersion : '4.13.2'
107
- androidxAppCompatVersion = project.hasProperty('androidxAppCompatVersion') ? rootProject.ext.androidxAppCompatVersion : '1.7.1'
108
- androidxJunitVersion = project.hasProperty('androidxJunitVersion') ? rootProject.ext.androidxJunitVersion : '1.3.0'
109
- androidxEspressoCoreVersion = project.hasProperty('androidxEspressoCoreVersion') ? rootProject.ext.androidxEspressoCoreVersion : '3.7.0'
106
+ junitVersion = rootProject.hasProperty('junitVersion') ? rootProject.ext.junitVersion : '4.13.2'
107
+ androidxAppCompatVersion = rootProject.hasProperty('androidxAppCompatVersion') ? rootProject.ext.androidxAppCompatVersion : '1.8.0'
108
+ androidxJunitVersion = rootProject.hasProperty('androidxJunitVersion') ? rootProject.ext.androidxJunitVersion : '1.3.0'
109
+ androidxEspressoCoreVersion = rootProject.hasProperty('androidxEspressoCoreVersion') ? rootProject.ext.androidxEspressoCoreVersion : '3.7.0'
110
110
  af_sdk_version = packageJson?.androidSdkVersion
111
111
  plugin_version = packageJson?.version
112
112
  plugin_build_version = packageJson?.buildNumber
113
113
  }
114
114
 
115
115
  buildscript {
116
- ext.kotlin_version = project.hasProperty("kotlin_version") ? rootProject.ext.kotlin_version : '2.2.20'
117
116
  repositories {
118
117
  google()
119
118
  mavenCentral()
120
119
  }
121
120
  dependencies {
122
- classpath 'com.android.tools.build:gradle:8.13.0'
123
- classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
121
+ classpath 'com.android.tools.build:gradle:9.4.1'
124
122
  classpath 'org.codehaus.groovy:groovy-json:3.0.9'
125
123
  }
126
124
  }
127
125
 
128
126
  apply plugin: 'com.android.library'
129
- apply plugin: 'kotlin-android'
130
127
 
131
128
  android {
132
129
  namespace = "capacitor.plugin.appsflyer.sdk"
133
- compileSdk = project.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion : 36
130
+ compileSdk = rootProject.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion : 37
134
131
  defaultConfig {
135
- minSdkVersion project.hasProperty('minSdkVersion') ? rootProject.ext.minSdkVersion : 24
136
- targetSdkVersion project.hasProperty('targetSdkVersion') ? rootProject.ext.targetSdkVersion : 36
132
+ consumerProguardFiles "proguard-rules.pro"
133
+ minSdkVersion rootProject.hasProperty('minSdkVersion') ? rootProject.ext.minSdkVersion : 26
137
134
  versionCode Integer.parseInt(plugin_build_version)
138
135
  versionName "$plugin_version"
139
136
  buildConfigField "int", "VERSION_CODE", plugin_build_version
@@ -170,8 +167,7 @@ dependencies {
170
167
  testImplementation "junit:junit:$junitVersion"
171
168
  androidTestImplementation "androidx.test.ext:junit:$androidxJunitVersion"
172
169
  androidTestImplementation "androidx.test.espresso:espresso-core:$androidxEspressoCoreVersion"
173
- implementation "androidx.core:core-ktx:1.8.0"
174
- implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
170
+ implementation 'androidx.core:core:1.19.1'
175
171
 
176
172
  implementation "com.appsflyer:af-android-sdk:$af_sdk_version"
177
173
  implementation "com.android.installreferrer:installreferrer:2.2"
@@ -0,0 +1,21 @@
1
+ # Add project specific ProGuard rules here.
2
+ # You can control the set of applied configuration files using the
3
+ # proguardFiles setting in build.gradle.
4
+ #
5
+ # For more details, see
6
+ # http://developer.android.com/guide/developing/tools/proguard.html
7
+
8
+ # If your project uses WebView with JS, uncomment the following
9
+ # and specify the fully qualified class name to the JavaScript interface
10
+ # class:
11
+ #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12
+ # public *;
13
+ #}
14
+
15
+ # Uncomment this to preserve the line number information for
16
+ # debugging stack traces.
17
+ #-keepattributes SourceFile,LineNumberTable
18
+
19
+ # If you keep the line number information, uncomment this to
20
+ # hide the original source file name.
21
+ #-renamesourcefileattribute SourceFile
@@ -210,24 +210,6 @@ class AppsFlyerPlugin : Plugin() {
210
210
  }
211
211
  }
212
212
 
213
- @Deprecated("Use setSharingFilterForPartners")
214
- @PluginMethod(returnType = PluginMethod.RETURN_NONE)
215
- fun setSharingFilter(call: PluginCall) {
216
- val arr = call.getArray(AF_FILTERS)
217
- if (arr != null && arr.length() > 0) {
218
- val filters = arr.toList<String>().toTypedArray()
219
- AppsFlyerLib.getInstance().setSharingFilter(*filters)
220
- } else {
221
- AppsFlyerLib.getInstance().setSharingFilter("")
222
- }
223
- }
224
-
225
- @Deprecated("Use setSharingFilterForPartners")
226
- @PluginMethod(returnType = PluginMethod.RETURN_NONE)
227
- fun setSharingFilterForAllPartners(call: PluginCall) {
228
- AppsFlyerLib.getInstance().setSharingFilterForAllPartners()
229
- }
230
-
231
213
  @PluginMethod(returnType = PluginMethod.RETURN_NONE)
232
214
  fun setSharingFilterForPartners(call: PluginCall) {
233
215
  val filters = call.getArray(AF_FILTERS)?.run {
@@ -399,53 +381,6 @@ class AppsFlyerPlugin : Plugin() {
399
381
  linkGenerator.generateLink(context, listener)
400
382
  }
401
383
 
402
- @Deprecated("Use validateAndLogInAppPurchaseV2 instead")
403
- @PluginMethod
404
- fun validateAndLogInAppPurchaseAndroid(call: PluginCall) {
405
- val currency = call.getString(AF_CURRENCY)
406
- val publicKey = call.getString(AF_PUBLIC_KEY)
407
- val signature = call.getString(AF_SIGNATURE)
408
- val purchaseData = call.getString(AF_PURCHASE_DATA)
409
- val price = call.getString(AF_PRICE)
410
- val additionalParameters =
411
- AFHelpers.jsonToStringMap(call.getObject(AF_ADDITIONAL_PARAMETERS))
412
- if (currency != null && publicKey != null && signature != null && purchaseData != null) {
413
- AppsFlyerLib.getInstance().apply {
414
- registerValidatorListener(
415
- context,
416
- object : AppsFlyerInAppPurchaseValidatorListener {
417
- override fun onValidateInApp() {
418
- val ret = JSObject()
419
- ret.put("res", "ok")
420
- call.resolve(ret)
421
- }
422
-
423
- override fun onValidateInAppFailure(p0: String?) {
424
- call.reject(p0)
425
- }
426
- })
427
-
428
- validateAndLogInAppPurchase(
429
- context,
430
- publicKey,
431
- signature,
432
- purchaseData,
433
- price,
434
- currency,
435
- additionalParameters
436
- )
437
- }
438
- } else {
439
- call.reject("Missing some fields")
440
- }
441
- }
442
-
443
- @Deprecated("Use validateAndLogInAppPurchaseV2 instead")
444
- @PluginMethod
445
- fun validateAndLogInAppPurchaseIos(call: PluginCall) {
446
- call.unavailable()
447
- }
448
-
449
384
  @PluginMethod
450
385
  fun validateAndLogInAppPurchaseV2(call: PluginCall) {
451
386
  try {
@@ -663,27 +598,6 @@ class AppsFlyerPlugin : Plugin() {
663
598
  }
664
599
  }
665
600
 
666
- @Deprecated("Please use setConsentDataV2 instead, which includes improved handling for GDPR and data privacy.")
667
- @PluginMethod(returnType = PluginMethod.RETURN_NONE)
668
- fun setConsentData(call: PluginCall) {
669
- val consentData = call.getObject("data") ?: return call.reject("Missing consent data")
670
-
671
- val isUserSubjectToGDPR = consentData.optBoolean(AF_IS_SUBJECTED_TO_GDPR)
672
- val hasConsentForDataUsage = consentData.optBoolean(AF_CONSENT_FOR_DATA_USAGE)
673
- val hasConsentForAdsPersonalization =
674
- consentData.optBoolean(AF_CONSENT_FOR_ADS_PERSONALIZATION)
675
-
676
- val consentObject = if (isUserSubjectToGDPR) {
677
- AppsFlyerConsent.forGDPRUser(hasConsentForDataUsage, hasConsentForAdsPersonalization)
678
- } else {
679
- AppsFlyerConsent.forNonGDPRUser()
680
- }
681
-
682
- AppsFlyerLib.getInstance().setConsentData(consentObject)
683
-
684
- call.resolve()
685
- }
686
-
687
601
  @PluginMethod(returnType = PluginMethod.RETURN_NONE)
688
602
  fun setConsentDataV2(call: PluginCall) {
689
603
  AppsFlyerLib.getInstance().setConsentData(
package/dist/docs.json CHANGED
@@ -274,44 +274,6 @@
274
274
  ],
275
275
  "slug": "addpushnotificationdeeplinkpath"
276
276
  },
277
- {
278
- "name": "setSharingFilter",
279
- "signature": "(filters: AFFilters) => Promise<void>",
280
- "parameters": [
281
- {
282
- "name": "filters",
283
- "docs": "",
284
- "type": "AFFilters"
285
- }
286
- ],
287
- "returns": "Promise<void>",
288
- "tags": [
289
- {
290
- "name": "deprecated",
291
- "text": "deprecated since 6.4.0. Use setSharingFilterForPartners instead"
292
- }
293
- ],
294
- "docs": "Stops events from propagating to the specified AppsFlyer partners.",
295
- "complexTypes": [
296
- "AFFilters"
297
- ],
298
- "slug": "setsharingfilter"
299
- },
300
- {
301
- "name": "setSharingFilterForAllPartners",
302
- "signature": "() => Promise<void>",
303
- "parameters": [],
304
- "returns": "Promise<void>",
305
- "tags": [
306
- {
307
- "name": "deprecated",
308
- "text": "deprecated since 6.4.0. Use setSharingFilterForPartners instead"
309
- }
310
- ],
311
- "docs": "Stops events from propagating to all AppsFlyer partners. Overwrites setSharingFilter.",
312
- "complexTypes": [],
313
- "slug": "setsharingfilterforallpartners"
314
- },
315
277
  {
316
278
  "name": "setSharingFilterForPartners",
317
279
  "signature": "(filters: AFFilters) => Promise<void>",
@@ -488,54 +450,6 @@
488
450
  ],
489
451
  "slug": "generateinvitelink"
490
452
  },
491
- {
492
- "name": "validateAndLogInAppPurchaseAndroid",
493
- "signature": "(purchaseData: AFAndroidInAppPurchase) => Promise<AFRes>",
494
- "parameters": [
495
- {
496
- "name": "purchaseData",
497
- "docs": "",
498
- "type": "AFAndroidInAppPurchase"
499
- }
500
- ],
501
- "returns": "Promise<AFRes>",
502
- "tags": [
503
- {
504
- "name": "deprecated",
505
- "text": "deprecated since 6.17.7."
506
- }
507
- ],
508
- "docs": "API for server verification of in-app purchases. An af_purchase event with the relevant values will be automatically logged if the validation is successful.",
509
- "complexTypes": [
510
- "AFRes",
511
- "AFAndroidInAppPurchase"
512
- ],
513
- "slug": "validateandloginapppurchaseandroid"
514
- },
515
- {
516
- "name": "validateAndLogInAppPurchaseIos",
517
- "signature": "(purchaseData: AFIosInAppPurchase) => Promise<AFRes>",
518
- "parameters": [
519
- {
520
- "name": "purchaseData",
521
- "docs": "",
522
- "type": "AFIosInAppPurchase"
523
- }
524
- ],
525
- "returns": "Promise<AFRes>",
526
- "tags": [
527
- {
528
- "name": "deprecated",
529
- "text": "deprecated since 6.17.7."
530
- }
531
- ],
532
- "docs": "",
533
- "complexTypes": [
534
- "AFRes",
535
- "AFIosInAppPurchase"
536
- ],
537
- "slug": "validateandloginapppurchaseios"
538
- },
539
453
  {
540
454
  "name": "getSdkVersion",
541
455
  "signature": "() => Promise<AFRes>",
@@ -759,33 +673,6 @@
759
673
  ],
760
674
  "slug": "enabletcfdatacollection"
761
675
  },
762
- {
763
- "name": "setConsentData",
764
- "signature": "(data: AFConsentData) => Promise<void>",
765
- "parameters": [
766
- {
767
- "name": "data",
768
- "docs": ": AppsFlyerConsent object.",
769
- "type": "AFConsentData"
770
- }
771
- ],
772
- "returns": "Promise<void>",
773
- "tags": [
774
- {
775
- "name": "param",
776
- "text": "data : AppsFlyerConsent object."
777
- },
778
- {
779
- "name": "deprecated",
780
- "text": "deprecated since 6.16.2. Use `setConsentDataV2` instead"
781
- }
782
- ],
783
- "docs": "Use to set user consent data manualy.\nif your app doesn't use a CMP compatible with TCF v2.2, use the following method to manualy provide the consent data directly to the SDK.",
784
- "complexTypes": [
785
- "AFConsentData"
786
- ],
787
- "slug": "setconsentdata"
788
- },
789
676
  {
790
677
  "name": "logAdRevenue",
791
678
  "signature": "(data: AFAdRevenueData) => Promise<void>",
@@ -1498,73 +1385,6 @@
1498
1385
  }
1499
1386
  ]
1500
1387
  },
1501
- {
1502
- "name": "AFAndroidInAppPurchase",
1503
- "slug": "afandroidinapppurchase",
1504
- "docs": "",
1505
- "tags": [],
1506
- "methods": [],
1507
- "properties": [
1508
- {
1509
- "name": "publicKey",
1510
- "tags": [],
1511
- "docs": "",
1512
- "complexTypes": [],
1513
- "type": "string"
1514
- },
1515
- {
1516
- "name": "signature",
1517
- "tags": [],
1518
- "docs": "",
1519
- "complexTypes": [],
1520
- "type": "string"
1521
- },
1522
- {
1523
- "name": "purchaseData",
1524
- "tags": [],
1525
- "docs": "",
1526
- "complexTypes": [],
1527
- "type": "string"
1528
- },
1529
- {
1530
- "name": "price",
1531
- "tags": [],
1532
- "docs": "",
1533
- "complexTypes": [],
1534
- "type": "string"
1535
- }
1536
- ]
1537
- },
1538
- {
1539
- "name": "AFIosInAppPurchase",
1540
- "slug": "afiosinapppurchase",
1541
- "docs": "",
1542
- "tags": [],
1543
- "methods": [],
1544
- "properties": [
1545
- {
1546
- "name": "inAppPurchase",
1547
- "tags": [],
1548
- "docs": "",
1549
- "complexTypes": [],
1550
- "type": "string"
1551
- },
1552
- {
1553
- "name": "price",
1554
- "tags": [],
1555
- "docs": "",
1556
- "complexTypes": [],
1557
- "type": "string"
1558
- },
1559
- {
1560
- "name": "transactionId",
1561
- "tags": [],
1562
- "docs": "",
1563
- "complexTypes": [],
1564
- "type": "string"
1565
- }
1566
- ]
1567
- },
1568
1388
  {
1569
1389
  "name": "AFFbDAL",
1570
1390
  "slug": "affbdal",
@@ -1773,54 +1593,6 @@
1773
1593
  }
1774
1594
  ]
1775
1595
  },
1776
- {
1777
- "name": "AFConsentData",
1778
- "slug": "afconsentdata",
1779
- "docs": "",
1780
- "tags": [],
1781
- "methods": [],
1782
- "properties": [
1783
- {
1784
- "name": "data",
1785
- "tags": [],
1786
- "docs": "",
1787
- "complexTypes": [
1788
- "IAppsFlyerConsent"
1789
- ],
1790
- "type": "IAppsFlyerConsent"
1791
- }
1792
- ]
1793
- },
1794
- {
1795
- "name": "IAppsFlyerConsent",
1796
- "slug": "iappsflyerconsent",
1797
- "docs": "",
1798
- "tags": [],
1799
- "methods": [],
1800
- "properties": [
1801
- {
1802
- "name": "isUserSubjectToGDPR",
1803
- "tags": [],
1804
- "docs": "",
1805
- "complexTypes": [],
1806
- "type": "boolean"
1807
- },
1808
- {
1809
- "name": "hasConsentForDataUsage",
1810
- "tags": [],
1811
- "docs": "",
1812
- "complexTypes": [],
1813
- "type": "boolean | undefined"
1814
- },
1815
- {
1816
- "name": "hasConsentForAdsPersonalization",
1817
- "tags": [],
1818
- "docs": "",
1819
- "complexTypes": [],
1820
- "type": "boolean | undefined"
1821
- }
1822
- ]
1823
- },
1824
1596
  {
1825
1597
  "name": "AFAdRevenueData",
1826
1598
  "slug": "afadrevenuedata",
@@ -1,6 +1,6 @@
1
1
  import type { PluginListenerHandle } from '@capacitor/core';
2
2
  import type { AFConstants } from './Appsflyer_constants';
3
- import type { AFAndroidInAppPurchase, AFAnonymizeUser, AFAppendToDeepLink, AFCuid, AFCurrency, AFData, AFDisable, AFEvent, AFFbDAL, AFFilters, AFHost, AFInit, AFIosInAppPurchase, AFIsStopped, AFLink, AFLinkGenerator, AFOnelinkDomain, AFOnelinkID, AFPath, AFPushPayload, AFRes, AFStop, AFUid, AFUninstall, AFUrls, AFLanguage, OnAppOpenAttribution, OnConversionDataResult, OnDeepLink, AFPromotion, AFEmails, AFLatLng, AFPhone, AFPartnerData, AFLogInvite, AFPurchaseDetailsV2, AFEnableTCFDataCollection, AFConsentData, AFAdRevenueData, AFConsentOptions, AFIsStarted } from './appsflyer_interfaces';
3
+ import type { AFAnonymizeUser, AFAppendToDeepLink, AFCuid, AFCurrency, AFData, AFDisable, AFEvent, AFFbDAL, AFFilters, AFHost, AFInit, AFIsStopped, AFLink, AFLinkGenerator, AFOnelinkDomain, AFOnelinkID, AFPath, AFPushPayload, AFRes, AFStop, AFUid, AFUninstall, AFUrls, AFLanguage, OnAppOpenAttribution, OnConversionDataResult, OnDeepLink, AFPromotion, AFEmails, AFLatLng, AFPhone, AFPartnerData, AFLogInvite, AFPurchaseDetailsV2, AFEnableTCFDataCollection, AFAdRevenueData, AFConsentOptions, AFIsStarted } from './appsflyer_interfaces';
4
4
  export interface AppsFlyerPlugin {
5
5
  addListener(eventName: AFConstants.CONVERSION_CALLBACK, listenerFunc: (event: OnConversionDataResult) => void): PluginListenerHandle;
6
6
  addListener(eventName: AFConstants.OAOA_CALLBACK, listenerFunc: (event: OnAppOpenAttribution) => void): PluginListenerHandle;
@@ -56,16 +56,6 @@ export interface AppsFlyerPlugin {
56
56
  * Configures how the SDK extracts deep link values from push notification payloads.
57
57
  */
58
58
  addPushNotificationDeepLinkPath(path: AFPath): Promise<void>;
59
- /**
60
- * Stops events from propagating to the specified AppsFlyer partners.
61
- * @deprecated deprecated since 6.4.0. Use setSharingFilterForPartners instead
62
- */
63
- setSharingFilter(filters: AFFilters): Promise<void>;
64
- /**
65
- * Stops events from propagating to all AppsFlyer partners. Overwrites setSharingFilter.
66
- * @deprecated deprecated since 6.4.0. Use setSharingFilterForPartners instead
67
- */
68
- setSharingFilterForAllPartners(): Promise<void>;
69
59
  /**
70
60
  * Stops events from propagating to the specified AppsFlyer partners.
71
61
  */
@@ -108,15 +98,6 @@ export interface AppsFlyerPlugin {
108
98
  * Allowing your existing users to invite their friends and contacts as new users to your app
109
99
  */
110
100
  generateInviteLink(params: AFLinkGenerator): Promise<AFLink>;
111
- /**
112
- * API for server verification of in-app purchases. An af_purchase event with the relevant values will be automatically logged if the validation is successful.
113
- * @deprecated deprecated since 6.17.7.
114
- */
115
- validateAndLogInAppPurchaseAndroid(purchaseData: AFAndroidInAppPurchase): Promise<AFRes>;
116
- /**
117
- * @deprecated deprecated since 6.17.7.
118
- */
119
- validateAndLogInAppPurchaseIos(purchaseData: AFIosInAppPurchase): Promise<AFRes>;
120
101
  /**
121
102
  * Get the AppsFlyer SDK version used in app.
122
103
  */
@@ -172,13 +153,6 @@ export interface AppsFlyerPlugin {
172
153
  * Flag value will be persisted between app sessions.
173
154
  */
174
155
  enableTCFDataCollection(shouldEnableTCFDataCollection: AFEnableTCFDataCollection): Promise<void>;
175
- /**
176
- * Use to set user consent data manualy.
177
- * if your app doesn't use a CMP compatible with TCF v2.2, use the following method to manualy provide the consent data directly to the SDK.
178
- * @param data: AppsFlyerConsent object.
179
- * @deprecated deprecated since 6.16.2. Use `setConsentDataV2` instead
180
- */
181
- setConsentData(data: AFConsentData): Promise<void>;
182
156
  /**
183
157
  * By attributing ad revenue, app owners gain the complete view of user LTV and campaign ROI.
184
158
  * Ad revenue is generated by displaying ads on rewarded videos, offer walls, interstitials, and banners in an app.
@@ -1 +1 @@
1
- {"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"","sourcesContent":["import type { PluginListenerHandle } from '@capacitor/core';\n\nimport type { AFConstants } from './Appsflyer_constants';\nimport type {\n AFAndroidInAppPurchase,\n AFAnonymizeUser,\n AFAppendToDeepLink,\n AFCuid,\n AFCurrency,\n AFData,\n AFDisable,\n AFEvent,\n AFFbDAL,\n AFFilters,\n AFHost,\n AFInit,\n AFIosInAppPurchase,\n AFIsStopped,\n AFLink,\n AFLinkGenerator,\n AFOnelinkDomain,\n AFOnelinkID,\n AFPath,\n AFPushPayload,\n AFRes,\n AFStop,\n AFUid,\n AFUninstall,\n AFUrls,\n AFLanguage,\n OnAppOpenAttribution,\n OnConversionDataResult,\n OnDeepLink,\n AFPromotion,\n AFEmails,\n AFLatLng,\n AFPhone,\n AFPartnerData,\n AFLogInvite,\n AFPurchaseDetailsV2,\n AFEnableTCFDataCollection,\n AFConsentData,\n AFAdRevenueData,\n AFConsentOptions,\n AFIsStarted,\n} from './appsflyer_interfaces';\n\nexport interface AppsFlyerPlugin {\n // register listener for onConversionDataSuccess and onConversionDataFail\n addListener(\n eventName: AFConstants.CONVERSION_CALLBACK,\n listenerFunc: (event: OnConversionDataResult) => void,\n ): PluginListenerHandle;\n\n // register listener for onAppOpenAttribution and onAttributionFailure\n addListener(\n eventName: AFConstants.OAOA_CALLBACK,\n listenerFunc: (event: OnAppOpenAttribution) => void,\n ): PluginListenerHandle;\n\n // register listener for onDeeplink\n addListener(eventName: AFConstants.UDL_CALLBACK, listenerFunc: (event: OnDeepLink) => void): PluginListenerHandle;\n\n /**\n * Use this method to initialize and start AppsFlyer SDK. This API should be called as soon as the app launched.\n */\n initSDK(options: AFInit): Promise<AFRes>;\n\n /**\n * Use this method to start AppsFlyer SDK, only on manual start mode.\n */\n startSDK(): Promise<AFRes>;\n\n /**\n * Log an in-app event.\n *\n * */\n logEvent(data: AFEvent): Promise<AFRes>;\n\n /**\n * Setting your own customer ID enables you to cross-reference your own unique ID with AppsFlyer's unique ID and other devices' IDs.\n * This ID is available in raw-data reports and in the Postback APIs for cross-referencing with your internal IDs.\n */\n setCustomerUserId(cuid: AFCuid): Promise<void>;\n\n /**\n * Sets the currency for in-app purchases. The currency code should be a 3 character ISO 4217 code\n * */\n setCurrencyCode(currencyCode: AFCurrency): Promise<void>;\n\n /**\n * (Android) Allows to pass GCM/FCM Tokens that where collected by third party plugins to the AppsFlyer server. Can be used for Uninstall log.\n * (iOS) Allows to pass APN Tokens that where collected by third party plugins to the AppsFlyer server. Can be used for log Uninstall.\n */\n updateServerUninstallToken(token: AFUninstall): Promise<void>;\n\n /**\n * Set the OneLink ID that should be used for attributing user-Invite. The link that is generated for the user invite will use this OneLink as the base link.\n */\n setAppInviteOneLink(id: AFOnelinkID): Promise<void>;\n\n /**\n * In order for AppsFlyer SDK to successfully resolve hidden (decoded in shortlink ID) attribution parameters, any domain that is configured as a branded domain in the AppsFlyer Dashboard should be provided to this method.\n */\n setOneLinkCustomDomain(domains: AFOnelinkDomain): Promise<void>;\n\n /**\n * Enables app owners using App Links for deep linking (without OneLink) to attribute sessions initiated via a domain associated with their app. Call this method before calling start.\n * You must provide the following parameters in the parameters Map:\n * pid\n * is_retargeting must be set to true\n * */\n appendParametersToDeepLinkingURL(data: AFAppendToDeepLink): Promise<void>;\n\n /**\n *Advertisers can wrap an AppsFlyer OneLink within another Universal Link. This Universal Link will invoke the app but any deep linking data will not propagate to AppsFlyer.\n * setResolveDeepLinkURLs enables you to configure the SDK to resolve the wrapped OneLink URLs, so that deep linking can occur correctly.\n */\n setResolveDeepLinkURLs(urls: AFUrls): Promise<void>;\n\n /**\n * Configures how the SDK extracts deep link values from push notification payloads.\n */\n addPushNotificationDeepLinkPath(path: AFPath): Promise<void>;\n\n /**\n * Stops events from propagating to the specified AppsFlyer partners.\n * @deprecated deprecated since 6.4.0. Use setSharingFilterForPartners instead\n */\n setSharingFilter(filters: AFFilters): Promise<void>;\n\n /**\n * Stops events from propagating to all AppsFlyer partners. Overwrites setSharingFilter.\n * @deprecated deprecated since 6.4.0. Use setSharingFilterForPartners instead\n */\n setSharingFilterForAllPartners(): Promise<void>;\n\n /**\n * Stops events from propagating to the specified AppsFlyer partners.\n */\n setSharingFilterForPartners(filters: AFFilters): Promise<void>;\n\n /**\n * Set additional data to be sent to AppsFlyer. See\n */\n setAdditionalData(additionalData: AFData): Promise<void>;\n\n /**\n * Get AppsFlyer's unique device ID (created for every new install of an app).\n */\n getAppsFlyerUID(): Promise<AFUid>;\n\n /**\n * End User Opt-Out from AppsFlyer analytics (Anonymize user data).\n */\n anonymizeUser(anonymize: AFAnonymizeUser): Promise<void>;\n\n /**\n * Once this API is invoked, our SDK no longer communicates with our servers and stops functioning.\n * Useful when implementing user opt-in/opt-out.\n */\n stop(stop?: AFStop): Promise<AFIsStopped>;\n\n /**\n * Opt-out of SKAdNetwork\n *\n */\n disableSKAdNetwork(stop: AFDisable): Promise<void>;\n\n /**\n * Disables collection of various Advertising IDs by the SDK. This includes Apple Identity for Advertisers (IDFA), Google Advertising ID (GAID), OAID and Amazon Advertising ID (AAID).\n */\n disableAdvertisingIdentifier(stop: AFDisable): Promise<void>;\n\n /**\n * Opt-out of Apple Search Ads attributions.\n */\n disableCollectASA(stop: AFDisable): Promise<void>;\n\n /**\n * Set a custom host.\n */\n setHost(hostName: AFHost): Promise<void>;\n\n /**\n * Allowing your existing users to invite their friends and contacts as new users to your app\n */\n generateInviteLink(params: AFLinkGenerator): Promise<AFLink>;\n\n /**\n * API for server verification of in-app purchases. An af_purchase event with the relevant values will be automatically logged if the validation is successful.\n * @deprecated deprecated since 6.17.7.\n */\n validateAndLogInAppPurchaseAndroid(purchaseData: AFAndroidInAppPurchase): Promise<AFRes>;\n\n /**\n * @deprecated deprecated since 6.17.7.\n */\n validateAndLogInAppPurchaseIos(purchaseData: AFIosInAppPurchase): Promise<AFRes>;\n\n /**\n * Get the AppsFlyer SDK version used in app.\n */\n getSdkVersion(): Promise<AFRes>;\n\n /**\n * Enable the collection of Facebook Deferred AppLinks. Requires Facebook SDK and Facebook app on target/client device.\n * This API must be invoked before initializing the AppsFlyer SDK in order to function properly.\n */\n enableFacebookDeferredApplinks(enable: AFFbDAL): Promise<AFRes>;\n\n /**\n * Measure and get data from push-notification campaigns.\n */\n sendPushNotificationData(payload: AFPushPayload): Promise<void>;\n\n /**\n * Set the language of the device. The data will be displayed in Raw Data Reports\n *\n */\n setCurrentDeviceLanguage(language: AFLanguage): Promise<AFRes>;\n\n /**\n * logs an impression as part of a cross-promotion campaign. Make sure to use the promoted App ID as it appears within the AppsFlyer dashboard.\n *\n */\n logCrossPromoteImpression(data: AFPromotion): Promise<AFRes>;\n\n /**\n * Set the user emails and encrypt them.\n */\n setUserEmails(emails: AFEmails): Promise<AFRes>;\n\n /**\n * Manually log the location of the user\n */\n logLocation(latLng: AFLatLng): Promise<AFRes>;\n\n /**\n * Will be sent as an SHA-256 encrypted string.\n */\n setPhoneNumber(phone: AFPhone): Promise<AFRes>;\n\n /**\n * Allows sending custom data for partner integration purposes.\n */\n setPartnerData(data: AFPartnerData): Promise<AFRes>;\n\n /**\n * Use to log a user-invite in-app event (af_invite).\n *\n */\n logInvite(data: AFLogInvite): Promise<AFRes>;\n\n /**\n * Use to opt-out of collecting the network operator name (carrier) and sim operator name from the device.\n *\n * @param disable Defaults to false\n */\n setDisableNetworkData(disable: AFDisable): Promise<void>;\n\n /**\n * Use to opt-in/out the automatic collection of consent data, for users who use a CMP.\n * Flag value will be persisted between app sessions.\n */\n enableTCFDataCollection(shouldEnableTCFDataCollection: AFEnableTCFDataCollection): Promise<void>;\n\n /**\n * Use to set user consent data manualy.\n * if your app doesn't use a CMP compatible with TCF v2.2, use the following method to manualy provide the consent data directly to the SDK.\n * @param data: AppsFlyerConsent object.\n * @deprecated deprecated since 6.16.2. Use `setConsentDataV2` instead\n */\n setConsentData(data: AFConsentData): Promise<void>;\n\n /**\n * By attributing ad revenue, app owners gain the complete view of user LTV and campaign ROI.\n * Ad revenue is generated by displaying ads on rewarded videos, offer walls, interstitials, and banners in an app.\n * You can use this method to log your ad revenue.\n * @param adRevenueData: object used to hold all mandatory parameters of AdRevenue event.\n */\n logAdRevenue(data: AFAdRevenueData): Promise<void>;\n\n /**\n * Use this to set user consent data manualy.\n * if your app doesn't use a CMP compatible with TCF v2.2, use the following method to manualy provide the consent data directly to the SDK.\n * @param options: AFConsentOptions that consists with all the possible options for consent collection, boolean params.\n */\n setConsentDataV2(options: AFConsentOptions): Promise<void>;\n\n /**\n * Use this method to check whether the AppsFlyer SDK has already been started in the current session.\n */\n isSDKStarted(): Promise<AFIsStarted>;\n\n /**\n * Use this method to check whether the AppsFlyer SDK is currently stopped.\n */\n isSDKStopped(): Promise<AFIsStopped>;\n\n /**\n * Disables AppSet ID collection. If called before SDK init, App Set ID will not be collected.\n * If called after init, App Set ID will be collected but not sent in request payloads.\n * Android only.\n */\n disableAppSetId(): Promise<void>;\n\n /**\n * API for server verification of in-app purchases V2.\n * An af_purchase event with the relevant values will be automatically logged if the validation is successful.\n *\n * @param data - Object containing purchaseDetails and optional additionalParameters\n * @returns Promise that resolves with validation result\n */\n validateAndLogInAppPurchaseV2(data: AFPurchaseDetailsV2): Promise<{ [key: string]: any }>;\n}\n"]}
1
+ {"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"","sourcesContent":["import type { PluginListenerHandle } from '@capacitor/core';\n\nimport type { AFConstants } from './Appsflyer_constants';\nimport type {\n AFAnonymizeUser,\n AFAppendToDeepLink,\n AFCuid,\n AFCurrency,\n AFData,\n AFDisable,\n AFEvent,\n AFFbDAL,\n AFFilters,\n AFHost,\n AFInit,\n AFIsStopped,\n AFLink,\n AFLinkGenerator,\n AFOnelinkDomain,\n AFOnelinkID,\n AFPath,\n AFPushPayload,\n AFRes,\n AFStop,\n AFUid,\n AFUninstall,\n AFUrls,\n AFLanguage,\n OnAppOpenAttribution,\n OnConversionDataResult,\n OnDeepLink,\n AFPromotion,\n AFEmails,\n AFLatLng,\n AFPhone,\n AFPartnerData,\n AFLogInvite,\n AFPurchaseDetailsV2,\n AFEnableTCFDataCollection,\n AFAdRevenueData,\n AFConsentOptions,\n AFIsStarted,\n} from './appsflyer_interfaces';\n\nexport interface AppsFlyerPlugin {\n // register listener for onConversionDataSuccess and onConversionDataFail\n addListener(\n eventName: AFConstants.CONVERSION_CALLBACK,\n listenerFunc: (event: OnConversionDataResult) => void,\n ): PluginListenerHandle;\n\n // register listener for onAppOpenAttribution and onAttributionFailure\n addListener(\n eventName: AFConstants.OAOA_CALLBACK,\n listenerFunc: (event: OnAppOpenAttribution) => void,\n ): PluginListenerHandle;\n\n // register listener for onDeeplink\n addListener(eventName: AFConstants.UDL_CALLBACK, listenerFunc: (event: OnDeepLink) => void): PluginListenerHandle;\n\n /**\n * Use this method to initialize and start AppsFlyer SDK. This API should be called as soon as the app launched.\n */\n initSDK(options: AFInit): Promise<AFRes>;\n\n /**\n * Use this method to start AppsFlyer SDK, only on manual start mode.\n */\n startSDK(): Promise<AFRes>;\n\n /**\n * Log an in-app event.\n *\n * */\n logEvent(data: AFEvent): Promise<AFRes>;\n\n /**\n * Setting your own customer ID enables you to cross-reference your own unique ID with AppsFlyer's unique ID and other devices' IDs.\n * This ID is available in raw-data reports and in the Postback APIs for cross-referencing with your internal IDs.\n */\n setCustomerUserId(cuid: AFCuid): Promise<void>;\n\n /**\n * Sets the currency for in-app purchases. The currency code should be a 3 character ISO 4217 code\n * */\n setCurrencyCode(currencyCode: AFCurrency): Promise<void>;\n\n /**\n * (Android) Allows to pass GCM/FCM Tokens that where collected by third party plugins to the AppsFlyer server. Can be used for Uninstall log.\n * (iOS) Allows to pass APN Tokens that where collected by third party plugins to the AppsFlyer server. Can be used for log Uninstall.\n */\n updateServerUninstallToken(token: AFUninstall): Promise<void>;\n\n /**\n * Set the OneLink ID that should be used for attributing user-Invite. The link that is generated for the user invite will use this OneLink as the base link.\n */\n setAppInviteOneLink(id: AFOnelinkID): Promise<void>;\n\n /**\n * In order for AppsFlyer SDK to successfully resolve hidden (decoded in shortlink ID) attribution parameters, any domain that is configured as a branded domain in the AppsFlyer Dashboard should be provided to this method.\n */\n setOneLinkCustomDomain(domains: AFOnelinkDomain): Promise<void>;\n\n /**\n * Enables app owners using App Links for deep linking (without OneLink) to attribute sessions initiated via a domain associated with their app. Call this method before calling start.\n * You must provide the following parameters in the parameters Map:\n * pid\n * is_retargeting must be set to true\n * */\n appendParametersToDeepLinkingURL(data: AFAppendToDeepLink): Promise<void>;\n\n /**\n *Advertisers can wrap an AppsFlyer OneLink within another Universal Link. This Universal Link will invoke the app but any deep linking data will not propagate to AppsFlyer.\n * setResolveDeepLinkURLs enables you to configure the SDK to resolve the wrapped OneLink URLs, so that deep linking can occur correctly.\n */\n setResolveDeepLinkURLs(urls: AFUrls): Promise<void>;\n\n /**\n * Configures how the SDK extracts deep link values from push notification payloads.\n */\n addPushNotificationDeepLinkPath(path: AFPath): Promise<void>;\n\n /**\n * Stops events from propagating to the specified AppsFlyer partners.\n */\n setSharingFilterForPartners(filters: AFFilters): Promise<void>;\n\n /**\n * Set additional data to be sent to AppsFlyer. See\n */\n setAdditionalData(additionalData: AFData): Promise<void>;\n\n /**\n * Get AppsFlyer's unique device ID (created for every new install of an app).\n */\n getAppsFlyerUID(): Promise<AFUid>;\n\n /**\n * End User Opt-Out from AppsFlyer analytics (Anonymize user data).\n */\n anonymizeUser(anonymize: AFAnonymizeUser): Promise<void>;\n\n /**\n * Once this API is invoked, our SDK no longer communicates with our servers and stops functioning.\n * Useful when implementing user opt-in/opt-out.\n */\n stop(stop?: AFStop): Promise<AFIsStopped>;\n\n /**\n * Opt-out of SKAdNetwork\n *\n */\n disableSKAdNetwork(stop: AFDisable): Promise<void>;\n\n /**\n * Disables collection of various Advertising IDs by the SDK. This includes Apple Identity for Advertisers (IDFA), Google Advertising ID (GAID), OAID and Amazon Advertising ID (AAID).\n */\n disableAdvertisingIdentifier(stop: AFDisable): Promise<void>;\n\n /**\n * Opt-out of Apple Search Ads attributions.\n */\n disableCollectASA(stop: AFDisable): Promise<void>;\n\n /**\n * Set a custom host.\n */\n setHost(hostName: AFHost): Promise<void>;\n\n /**\n * Allowing your existing users to invite their friends and contacts as new users to your app\n */\n generateInviteLink(params: AFLinkGenerator): Promise<AFLink>;\n\n /**\n * Get the AppsFlyer SDK version used in app.\n */\n getSdkVersion(): Promise<AFRes>;\n\n /**\n * Enable the collection of Facebook Deferred AppLinks. Requires Facebook SDK and Facebook app on target/client device.\n * This API must be invoked before initializing the AppsFlyer SDK in order to function properly.\n */\n enableFacebookDeferredApplinks(enable: AFFbDAL): Promise<AFRes>;\n\n /**\n * Measure and get data from push-notification campaigns.\n */\n sendPushNotificationData(payload: AFPushPayload): Promise<void>;\n\n /**\n * Set the language of the device. The data will be displayed in Raw Data Reports\n *\n */\n setCurrentDeviceLanguage(language: AFLanguage): Promise<AFRes>;\n\n /**\n * logs an impression as part of a cross-promotion campaign. Make sure to use the promoted App ID as it appears within the AppsFlyer dashboard.\n *\n */\n logCrossPromoteImpression(data: AFPromotion): Promise<AFRes>;\n\n /**\n * Set the user emails and encrypt them.\n */\n setUserEmails(emails: AFEmails): Promise<AFRes>;\n\n /**\n * Manually log the location of the user\n */\n logLocation(latLng: AFLatLng): Promise<AFRes>;\n\n /**\n * Will be sent as an SHA-256 encrypted string.\n */\n setPhoneNumber(phone: AFPhone): Promise<AFRes>;\n\n /**\n * Allows sending custom data for partner integration purposes.\n */\n setPartnerData(data: AFPartnerData): Promise<AFRes>;\n\n /**\n * Use to log a user-invite in-app event (af_invite).\n *\n */\n logInvite(data: AFLogInvite): Promise<AFRes>;\n\n /**\n * Use to opt-out of collecting the network operator name (carrier) and sim operator name from the device.\n *\n * @param disable Defaults to false\n */\n setDisableNetworkData(disable: AFDisable): Promise<void>;\n\n /**\n * Use to opt-in/out the automatic collection of consent data, for users who use a CMP.\n * Flag value will be persisted between app sessions.\n */\n enableTCFDataCollection(shouldEnableTCFDataCollection: AFEnableTCFDataCollection): Promise<void>;\n\n /**\n * By attributing ad revenue, app owners gain the complete view of user LTV and campaign ROI.\n * Ad revenue is generated by displaying ads on rewarded videos, offer walls, interstitials, and banners in an app.\n * You can use this method to log your ad revenue.\n * @param adRevenueData: object used to hold all mandatory parameters of AdRevenue event.\n */\n logAdRevenue(data: AFAdRevenueData): Promise<void>;\n\n /**\n * Use this to set user consent data manualy.\n * if your app doesn't use a CMP compatible with TCF v2.2, use the following method to manualy provide the consent data directly to the SDK.\n * @param options: AFConsentOptions that consists with all the possible options for consent collection, boolean params.\n */\n setConsentDataV2(options: AFConsentOptions): Promise<void>;\n\n /**\n * Use this method to check whether the AppsFlyer SDK has already been started in the current session.\n */\n isSDKStarted(): Promise<AFIsStarted>;\n\n /**\n * Use this method to check whether the AppsFlyer SDK is currently stopped.\n */\n isSDKStopped(): Promise<AFIsStopped>;\n\n /**\n * Disables AppSet ID collection. If called before SDK init, App Set ID will not be collected.\n * If called after init, App Set ID will be collected but not sent in request payloads.\n * Android only.\n */\n disableAppSetId(): Promise<void>;\n\n /**\n * API for server verification of in-app purchases V2.\n * An af_purchase event with the relevant values will be automatically logged if the validation is successful.\n *\n * @param data - Object containing purchaseDetails and optional additionalParameters\n * @returns Promise that resolves with validation result\n */\n validateAndLogInAppPurchaseV2(data: AFPurchaseDetailsV2): Promise<{ [key: string]: any }>;\n}\n"]}
@@ -20,8 +20,6 @@ public class AppsFlyerPlugin: CAPPlugin, CAPBridgedPlugin {
20
20
  CAPPluginMethod(name: "appendParametersToDeepLinkingURL", returnType: CAPPluginReturnNone),
21
21
  CAPPluginMethod(name: "setResolveDeepLinkURLs", returnType: CAPPluginReturnNone),
22
22
  CAPPluginMethod(name: "addPushNotificationDeepLinkPath", returnType: CAPPluginReturnNone),
23
- CAPPluginMethod(name: "setSharingFilter", returnType: CAPPluginReturnNone),
24
- CAPPluginMethod(name: "setSharingFilterForAllPartners", returnType: CAPPluginReturnNone),
25
23
  CAPPluginMethod(name: "setSharingFilterForPartners", returnType: CAPPluginReturnNone),
26
24
  CAPPluginMethod(name: "setAdditionalData", returnType: CAPPluginReturnNone),
27
25
  CAPPluginMethod(name: "getAppsFlyerUID", returnType: CAPPluginReturnPromise),
@@ -32,8 +30,6 @@ public class AppsFlyerPlugin: CAPPlugin, CAPBridgedPlugin {
32
30
  CAPPluginMethod(name: "disableCollectASA", returnType: CAPPluginReturnNone),
33
31
  CAPPluginMethod(name: "setHost", returnType: CAPPluginReturnNone),
34
32
  CAPPluginMethod(name: "generateInviteLink", returnType: CAPPluginReturnPromise),
35
- CAPPluginMethod(name: "validateAndLogInAppPurchaseAndroid", returnType: CAPPluginReturnPromise),
36
- CAPPluginMethod(name: "validateAndLogInAppPurchaseIos", returnType: CAPPluginReturnPromise),
37
33
  CAPPluginMethod(name: "getSdkVersion", returnType: CAPPluginReturnPromise),
38
34
  CAPPluginMethod(name: "enableFacebookDeferredApplinks", returnType: CAPPluginReturnPromise),
39
35
  CAPPluginMethod(name: "sendPushNotificationData", returnType: CAPPluginReturnNone),
@@ -46,7 +42,6 @@ public class AppsFlyerPlugin: CAPPlugin, CAPBridgedPlugin {
46
42
  CAPPluginMethod(name: "logInvite", returnType: CAPPluginReturnPromise),
47
43
  CAPPluginMethod(name: "setDisableNetworkData", returnType: CAPPluginReturnNone),
48
44
  CAPPluginMethod(name: "enableTCFDataCollection", returnType: CAPPluginReturnNone),
49
- CAPPluginMethod(name: "setConsentData", returnType: CAPPluginReturnNone),
50
45
  CAPPluginMethod(name: "logAdRevenue", returnType: CAPPluginReturnNone),
51
46
  CAPPluginMethod(name: "setConsentDataV2", returnType: CAPPluginReturnNone),
52
47
  CAPPluginMethod(name: "isSDKStarted", returnType: CAPPluginReturnPromise),
@@ -393,20 +388,7 @@ public class AppsFlyerPlugin: CAPPlugin, CAPBridgedPlugin {
393
388
 
394
389
  }
395
390
 
396
- @available(*, deprecated, message: "Use setSharingFilterForPartners")
397
- @objc func setSharingFilter(_ call: CAPPluginCall){
398
- let filters = call.getArray(AppsFlyerConstants.AF_FILTERS , String.self)
399
-
400
- AppsFlyerLib.shared().sharingFilter = filters
401
-
402
- }
403
391
 
404
- @available(*, deprecated, message: "Use setSharingFilterForPartners")
405
- @objc func setSharingFilterForAllPartners(_ call: CAPPluginCall){
406
-
407
- AppsFlyerLib.shared().setSharingFilterForAllPartners()
408
-
409
- }
410
392
 
411
393
  @objc func setSharingFilterForPartners(_ call: CAPPluginCall){
412
394
  guard let filters = call.getArray(AppsFlyerConstants.AF_FILTERS , String.self) else{
@@ -447,30 +429,6 @@ public class AppsFlyerPlugin: CAPPlugin, CAPBridgedPlugin {
447
429
  .enableTCFDataCollection(shouldEnableTCFDataCollection)
448
430
  }
449
431
 
450
- @objc func setConsentData(_ call: CAPPluginCall) {
451
- guard let consentData = call.getObject("data") else {
452
- call.reject("Consent data is missing")
453
- return
454
- }
455
-
456
- let isUserSubjectToGDPR = consentData[AppsFlyerConstants.AF_IS_SUBJECTED_TO_DGPR] as? Bool ?? false
457
- let hasConsentForDataUsage = consentData[AppsFlyerConstants.AF_CONSENT_FOR_DATA_USAGE] as? Bool ?? false
458
- let hasConsentForAdsPersonalization = consentData[AppsFlyerConstants.AF_CONSENT_FOR_ADS_PERSONALIZATION] as? Bool ?? false
459
-
460
- let consentObject: AppsFlyerConsent
461
- if isUserSubjectToGDPR {
462
- consentObject = AppsFlyerConsent(
463
- forGDPRUserWithHasConsentForDataUsage: hasConsentForDataUsage,
464
- hasConsentForAdsPersonalization: hasConsentForAdsPersonalization
465
- )
466
- } else {
467
- consentObject = AppsFlyerConsent(nonGDPRUser: ())
468
- }
469
-
470
- AppsFlyerLib.shared().setConsentData(consentObject)
471
-
472
- call.resolve()
473
- }
474
432
 
475
433
  @objc func setConsentDataV2(_ call: CAPPluginCall) {
476
434
  // inner helper: convert Bool? to NSNumber?
@@ -607,46 +565,7 @@ public class AppsFlyerPlugin: CAPPlugin, CAPBridgedPlugin {
607
565
  )
608
566
 
609
567
  }
610
- @available(*, deprecated, message: "Use validateAndLogInAppPurchaseV2 instead")
611
- @objc func validateAndLogInAppPurchaseAndroid(_ call: CAPPluginCall){
612
- call.unavailable()
613
- }
614
568
 
615
- @available(*, deprecated, message: "Use validateAndLogInAppPurchaseV2 instead")
616
- @objc func validateAndLogInAppPurchaseIos(_ call: CAPPluginCall){
617
- let currency = call.getString(AppsFlyerConstants.AF_CURRENCY)
618
- let price = call.getString(AppsFlyerConstants.AF_PRICE)
619
- let _inAppPurchase = call.getString(
620
- AppsFlyerConstants.AF_IN_APP_PURCHASE
621
- )
622
- let transactionId = call.getString(AppsFlyerConstants.AF_TRANSACTION_ID)
623
- let additionalParameters = call.getObject(AppsFlyerConstants.AF_ADDITIONAL_PARAMETERS) ?? [:]
624
-
625
- if currency != nil && price != nil && _inAppPurchase != nil && transactionId != nil && currency != nil {
626
- AppsFlyerLib.shared().validateAndLog(
627
- inAppPurchase: _inAppPurchase,
628
- price: price,
629
- currency: currency,
630
- transactionId: transactionId,
631
- additionalParameters: additionalParameters,
632
- success: {result in
633
- call.resolve(["res":result])
634
- },
635
- failure: { error, result in
636
- guard let emptyInApp = result as? [String:Any]
637
- else
638
- {
639
- call.reject((error)?.localizedDescription ?? "error" )
640
- return
641
- }
642
- call.reject((error)?.localizedDescription ?? "error" , emptyInApp.jsonStringRepresentation)
643
- })
644
- }else{
645
- call.reject("Missing some fields")
646
- }
647
-
648
-
649
- }
650
569
 
651
570
  @objc func getSdkVersion(_ call: CAPPluginCall){
652
571
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capgo/capacitor-appsflyer",
3
- "version": "8.1.20",
3
+ "version": "9.0.0",
4
4
  "iosSdkVersion": "6.17.8",
5
5
  "androidSdkVersion": "6.17.5",
6
6
  "buildNumber": "1",
@@ -17,7 +17,8 @@
17
17
  "ios/Tests",
18
18
  "Package.swift",
19
19
  "CapgoCapacitorAppsflyer.podspec",
20
- "scripts/configure-ios-dsyms.js"
20
+ "scripts/configure-ios-dsyms.js",
21
+ "android/proguard-rules.pro"
21
22
  ],
22
23
  "author": "Martin Donadieu <martin@capgo.app>",
23
24
  "license": "MIT",
@@ -61,11 +62,11 @@
61
62
  "changelog:ai": "node scripts/generate-ai-changelog.mjs"
62
63
  },
63
64
  "devDependencies": {
64
- "@capacitor/android": "^8.0.0",
65
- "@capacitor/cli": "^8.0.0",
66
- "@capacitor/core": "^8.0.0",
65
+ "@capacitor/android": "^9.0.0",
66
+ "@capacitor/cli": "^9.0.0",
67
+ "@capacitor/core": "^9.0.0",
67
68
  "@capacitor/docgen": "^0.3.1",
68
- "@capacitor/ios": "^8.0.0",
69
+ "@capacitor/ios": "^9.0.0",
69
70
  "@ionic/eslint-config": "^0.5.0",
70
71
  "@ionic/prettier-config": "^4.0.0",
71
72
  "@ionic/swiftlint-config": "^2.0.0",
@@ -82,7 +83,7 @@
82
83
  "typescript": "^6.0.3"
83
84
  },
84
85
  "peerDependencies": {
85
- "@capacitor/core": ">=8.0.0"
86
+ "@capacitor/core": "^9.0.0"
86
87
  },
87
88
  "prettier": "@ionic/prettier-config",
88
89
  "swiftlint": "@ionic/swiftlint-config",