affise-attribution-lib 1.7.1 → 1.7.4

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.
package/README.md CHANGED
@@ -1,10 +1,17 @@
1
1
  # Affise Attribution React Native Library
2
2
 
3
- [Change Log](CHANGELOG.md)
3
+ [![telegram](https://badges.ws/badge/Affise%20channel-08c?icon=telegram)](https://t.me/AffiseChangelog)
4
+ [![latest release](https://badges.ws/github/release/affise/affise-mmp-sdk-flutter)]((https://github.com/affise/affise-mmp-sdk-flutter/releases/latest))
5
+ [![npm](https://badges.ws/npm/v/affise-attribution-lib)](https://www.npmjs.com/package/affise-attribution-lib)
6
+ ![license](https://badges.ws/github/l/affise/affise-mmp-sdk-flutter)
7
+ ![repo size](https://badges.ws/github/repo-size/affise/affise-mmp-sdk-flutter)
8
+ ![last commit](https://badges.ws/github/last-commit/affise/affise-mmp-sdk-flutter)
9
+
10
+ [![Change Log](https://badges.ws/badge/Change%20Log?icon=react)](CHANGELOG.md)
4
11
 
5
12
  | Package | Version |
6
13
  |--------------------------|:----------------------------------------------------------------------------------------------------------------------------------------:|
7
- | `affise-attribution-lib` | [![attribution](https://img.shields.io/npm/v/affise-attribution-lib?label=latest)](https://www.npmjs.com/package/affise-attribution-lib) |
14
+ | `affise-attribution-lib` | [![npm](https://badges.ws/npm/v/affise-attribution-lib)](https://www.npmjs.com/package/affise-attribution-lib) |
8
15
 
9
16
  - [Affise Attribution React Native Library](#affise-attribution-react-native-library)
10
17
  - [Description](#description)
@@ -108,7 +115,7 @@ referrer.
108
115
 
109
116
  ### SDK compatibility
110
117
 
111
- - `Xcode` `14.2+`
118
+ - `Xcode` `14.2+`
112
119
  - `iOS` `12+`
113
120
  - `Android` `24+`
114
121
 
@@ -154,7 +161,7 @@ Add modules to Android project
154
161
  Example [`example/android/app/build.gradle`](example/android/app/build.gradle)
155
162
 
156
163
  ```gradle
157
- final affise_version = '1.7.1'
164
+ final affise_version = '1.7.4'
158
165
 
159
166
  dependencies {
160
167
  // Affise modules
@@ -179,14 +186,14 @@ Add modules to iOS project
179
186
 
180
187
  | Module | Version |
181
188
  |----------------|:------------------------------------------------------------------------------------:|
182
- | `ADSERVICE` | [`1.7.1`](https://github.com/CocoaPods/Specs/tree/master/Specs/0/3/d/AffiseModule/) |
183
- | `ADVERTISING` | [`1.7.1`](https://github.com/CocoaPods/Specs/tree/master/Specs/0/3/d/AffiseModule/) |
184
- | `APPSFLYER` | [`1.7.1`](https://github.com/CocoaPods/Specs/tree/master/Specs/0/3/d/AffiseModule/) |
185
- | `LINK` | [`1.7.1`](https://github.com/CocoaPods/Specs/tree/master/Specs/0/3/d/AffiseModule/) |
186
- | `PERSISTENT` | [`1.7.1`](https://github.com/CocoaPods/Specs/tree/master/Specs/0/3/d/AffiseModule/) |
187
- | `STATUS` | [`1.7.1`](https://github.com/CocoaPods/Specs/tree/master/Specs/0/3/d/AffiseModule/) |
188
- | `SUBSCRIPTION` | [`1.7.1`](https://github.com/CocoaPods/Specs/tree/master/Specs/0/3/d/AffiseModule/) |
189
- | `TIKTOK` | [`1.7.1`](https://github.com/CocoaPods/Specs/tree/master/Specs/0/3/d/AffiseModule/) |
189
+ | `ADSERVICE` | [![latest](https://badges.ws/cocoapods/v/AffiseModule)](https://github.com/CocoaPods/Specs/tree/master/Specs/0/3/d/AffiseModule/) |
190
+ | `ADVERTISING` | [![latest](https://badges.ws/cocoapods/v/AffiseModule)](https://github.com/CocoaPods/Specs/tree/master/Specs/0/3/d/AffiseModule/) |
191
+ | `APPSFLYER` | [![latest](https://badges.ws/cocoapods/v/AffiseModule)](https://github.com/CocoaPods/Specs/tree/master/Specs/0/3/d/AffiseModule/) |
192
+ | `LINK` | [![latest](https://badges.ws/cocoapods/v/AffiseModule)](https://github.com/CocoaPods/Specs/tree/master/Specs/0/3/d/AffiseModule/) |
193
+ | `PERSISTENT` | [![latest](https://badges.ws/cocoapods/v/AffiseModule)](https://github.com/CocoaPods/Specs/tree/master/Specs/0/3/d/AffiseModule/) |
194
+ | `STATUS` | [![latest](https://badges.ws/cocoapods/v/AffiseModule)](https://github.com/CocoaPods/Specs/tree/master/Specs/0/3/d/AffiseModule/) |
195
+ | `SUBSCRIPTION` | [![latest](https://badges.ws/cocoapods/v/AffiseModule)](https://github.com/CocoaPods/Specs/tree/master/Specs/0/3/d/AffiseModule/) |
196
+ | `TIKTOK` | [![latest](https://badges.ws/cocoapods/v/AffiseModule)](https://github.com/CocoaPods/Specs/tree/master/Specs/0/3/d/AffiseModule/) |
190
197
 
191
198
  Example [example/ios/Podfile](example/ios/Podfile)
192
199
 
@@ -194,7 +201,7 @@ Example [example/ios/Podfile](example/ios/Podfile)
194
201
  target 'YourAppProject' do
195
202
  # ...
196
203
 
197
- affise_version = '1.7.1'
204
+ affise_version = '1.7.4'
198
205
  # Affise Modules
199
206
  pod 'AffiseModule/AdService', affise_version
200
207
  pod 'AffiseModule/Advertising', affise_version
@@ -226,7 +233,7 @@ Affise
226
233
  affiseAppId: 'Your appId',
227
234
  secretKey: 'Your SDK secretKey',
228
235
  })
229
- .setDisableModules([
236
+ .setDisableModules([
230
237
  // Exclude modules from start
231
238
  AffiseModules.ADVERTISING,
232
239
  AffiseModules.SUBSCRIPTION,
@@ -247,7 +254,7 @@ Sends `attributionToken` from `AdServices` framework `AAAttribution.attributionT
247
254
  > 🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥
248
255
  >
249
256
  > `iOS` only
250
- >
257
+ >
251
258
  > Advertising Module starting **Manually**
252
259
  >
253
260
  > 🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥
@@ -261,7 +268,7 @@ Affise.module.advertising.startModule()
261
268
  > 🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥
262
269
  >
263
270
  > `iOS` only
264
- >
271
+ >
265
272
  > Module Advertising requires `NSUserTrackingUsageDescription` key in `info.plist`
266
273
  >
267
274
  > Application **will crash** if key not present
@@ -287,7 +294,7 @@ const eventValues = {
287
294
  };
288
295
  // Send AppsFlyer event
289
296
  appsFlyer.logEvent(
290
- eventName,
297
+ eventName,
291
298
  eventValues,
292
299
  (res) => console.log(res),
293
300
  (err) => console.error(err)
@@ -299,7 +306,7 @@ Affise.module.appsflyer.logEvent(eventName, eventValues);
299
306
  Is Module present:
300
307
 
301
308
  ```typescript
302
- Affise.module.appsflyer.hasModule().then((hasModule) => {
309
+ Affise.module.appsflyer.hasModule().then((hasModule) => {
303
310
  // Check is module present
304
311
  })
305
312
  ```
@@ -335,7 +342,7 @@ Affise.module.link.resolve("SITE_WITH_REDIRECTION", (redirectUrl) => {
335
342
  Is Module present:
336
343
 
337
344
  ```typescript
338
- Affise.module.link.hasModule().then((hasModule) => {
345
+ Affise.module.link.hasModule().then((hasModule) => {
339
346
  // Check is module present
340
347
  })
341
348
  ```
@@ -379,7 +386,7 @@ Affise
379
386
  `iOS Only`
380
387
 
381
388
  > [!NOTE]
382
- >
389
+ >
383
390
  > Module requires user phone to be authenticated by Apple ID
384
391
  >
385
392
  > It uses Apple `Security` framework to store protected information in user account
@@ -438,7 +445,7 @@ Affise.module.subscription.purchase(product, AffiseProductType.CONSUMABLE, (resu
438
445
  Is Module present:
439
446
 
440
447
  ```typescript
441
- Affise.module.subscription.hasModule().then((hasModule) => {
448
+ Affise.module.subscription.hasModule().then((hasModule) => {
442
449
  // Check is module present
443
450
  })
444
451
  ```
@@ -457,9 +464,9 @@ Affise.module.subscription.hasModule().then((hasModule) => {
457
464
  > 🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥
458
465
  >
459
466
  > There are no official React Native TikTok package.
460
- >
467
+ >
461
468
  > You have to add native dependency manually.
462
- >
469
+ >
463
470
  > Add the Android TikTok SDK dependency [TikTok Docs](https://business-api.tiktok.com/gateway/docs/index?identify_key=c0138ffadd90a955c1f0670a56fe348d1d40680b3c89461e09f78ed26785164b&language=ENGLISH&doc_id=1739585434183746#item-link-1.%20Add%20the%20SDK%20as%20a%20build%20dependency)
464
471
  >
465
472
  > Add the iOS TikTok SDK dependency [TikTok Docs](https://business-api.tiktok.com/gateway/docs/index?identify_key=c0138ffadd90a955c1f0670a56fe348d1d40680b3c89461e09f78ed26785164b&language=ENGLISH&doc_id=1739585432134657#item-link-1.%20Add%20the%20SDK%20as%20a%20build%20dependency)
@@ -491,7 +498,7 @@ Affise.module.tikTok.sendEvent(eventName, properties, eventId);
491
498
  Is Module present:
492
499
 
493
500
  ```typescript
494
- Affise.module.tikTok.hasModule().then((hasModule) => {
501
+ Affise.module.tikTok.hasModule().then((hasModule) => {
495
502
  // Check is module present
496
503
  })
497
504
  ```
@@ -645,7 +652,7 @@ Affise
645
652
  affiseAppId: 'Your appId',
646
653
  secretKey: 'Your SDK secretKey',
647
654
  })
648
- .setDisableModules([
655
+ .setDisableModules([
649
656
  AffiseModules.PERSISTENT, // Disable module programmatically for iOS
650
657
  AffiseModules.ANDROIDID, // Disable module programmatically for Android
651
658
  ])
@@ -1190,7 +1197,7 @@ For `Objective-C` edit [`AppDelegate.mm`](example/ios/AffiseAttributionLibExampl
1190
1197
  {
1191
1198
  [token appendFormat:@"%02.2hhX", data[i]];
1192
1199
  }
1193
-
1200
+
1194
1201
  [Affise addPushTokenWithPushToken:[token copy] service:APPLE];
1195
1202
  }
1196
1203
  ```
@@ -1219,7 +1226,7 @@ async function firebaseSetup() {
1219
1226
  }
1220
1227
 
1221
1228
  function getToken() {
1222
- messaging().getToken().then((fcmToken) => {
1229
+ messaging().getToken().then((fcmToken) => {
1223
1230
  Affise.addPushToken(fcmToken, PushTokenService.FIREBASE);
1224
1231
  });
1225
1232
  }
@@ -1235,8 +1242,8 @@ import { Platform } from 'react-native';
1235
1242
  import messaging from '@react-native-firebase/messaging';
1236
1243
 
1237
1244
  function getToken() {
1238
- if (Platform.OS == 'ios') {
1239
- messaging().getAPNSToken().then((apnsToken) => {
1245
+ if (Platform.OS == 'ios') {
1246
+ messaging().getAPNSToken().then((apnsToken) => {
1240
1247
  if (!apnsToken) return
1241
1248
  Affise.addPushToken(apnsToken, PushTokenService.APPLE);
1242
1249
  });
@@ -1575,7 +1582,7 @@ Affise.getRandomUserId();
1575
1582
  > 🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥
1576
1583
  >
1577
1584
  > Return `11111111-1111-1111-1111-111111111111` if **Affise SDK not initialized**
1578
- >
1585
+ >
1579
1586
  > Return `22222222-2222-2222-2222-222222222222` if **no valid methods** to retrieve id **for current device**
1580
1587
  >
1581
1588
  > `AffiseError.UUID_NOT_INITIALIZED` == `11111111-1111-1111-1111-111111111111`
@@ -1607,11 +1614,11 @@ Affise.getRandomDeviceId();
1607
1614
  > 🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥
1608
1615
  >
1609
1616
  > Return `11111111-1111-1111-1111-111111111111` if **Affise SDK not initialized**
1610
- >
1617
+ >
1611
1618
  > Return `22222222-2222-2222-2222-222222222222` if **no valid methods** to retrieve id **for current device**
1612
- >
1619
+ >
1613
1620
  > `AffiseError.UUID_NOT_INITIALIZED` == `11111111-1111-1111-1111-111111111111`
1614
- >
1621
+ >
1615
1622
  > `AffiseError.UUID_NO_VALID_METHOD` == `22222222-2222-2222-2222-222222222222`
1616
1623
  >
1617
1624
  > 🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥
@@ -1878,15 +1885,15 @@ Affise.debug.versionNative().then((version) => {
1878
1885
  > [!CAUTION]
1879
1886
  >
1880
1887
  > 🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥
1881
- >
1888
+ >
1882
1889
  > If Affise settings doesn't change after version update or api is working incorrectly.
1883
1890
  >
1884
1891
  > **First**: try **reset cache** for `React Native`. `npm start -- --reset-cache` or `npm cache clean --force`
1885
1892
  >
1886
1893
  > **Second**: completely stop application on device **and** stop `React Native` `Metro server`
1887
1894
  >
1888
- > React Native relaunch `JavaScript`/`TypeScript` on live code change,
1889
- > but native code (such as Affise native library) won't restart
1895
+ > React Native relaunch `JavaScript`/`TypeScript` on live code change,
1896
+ > but native code (such as Affise native library) won't restart
1890
1897
  > unless Android application is **manually restarted** or **completely rebuild**
1891
1898
  >
1892
1899
  > 🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥
@@ -1894,13 +1901,13 @@ Affise.debug.versionNative().then((version) => {
1894
1901
  > [!NOTE]
1895
1902
  >
1896
1903
  > 🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥
1897
- >
1904
+ >
1898
1905
  > Then reporting a **BUG**
1899
1906
  >
1900
1907
  > **Please** provide information:
1901
1908
  >
1902
1909
  > 1. From command `npx react-native doctor`
1903
- >
1910
+ >
1904
1911
  > 2. From command `npx react-native info`
1905
1912
  >
1906
1913
  > 3. On which platform bug occurred `iOS` or `Android`
@@ -17,7 +17,7 @@ Pod::Spec.new do |s|
17
17
  s.source_files = "ios/**/*.{h,m,mm,swift}"
18
18
 
19
19
  s.dependency "React-Core"
20
- s.dependency 'AffiseInternal', '1.7.1'
20
+ s.dependency 'AffiseInternal', '1.7.4'
21
21
 
22
22
  # Don't install the dependencies when we run `pod install` in the old architecture.
23
23
  if ENV['RCT_NEW_ARCH_ENABLED'] == '1' then
@@ -2,7 +2,7 @@ buildscript {
2
2
  // Buildscript is evaluated before everything else so we can't use getExtOrDefault
3
3
  def kotlin_version = rootProject.ext.has("kotlinVersion") ? rootProject.ext.get("kotlinVersion") : project.properties["AffiseAttributionNative_kotlinVersion"]
4
4
  ext {
5
- affise_version = '1.7.1'
5
+ affise_version = '1.7.4'
6
6
  agp_version = '7.2.2'
7
7
  }
8
8
 
@@ -1,4 +1,4 @@
1
- AffiseAttributionNative_kotlinVersion=1.7.0
1
+ AffiseAttributionNative_kotlinVersion=1.9.0
2
2
  AffiseAttributionNative_minSdkVersion=21
3
3
  AffiseAttributionNative_targetSdkVersion=35
4
4
  AffiseAttributionNative_compileSdkVersion=35
@@ -31,7 +31,7 @@ class AffiseDebug {
31
31
  * Debug get version of flutter library
32
32
  */
33
33
  version() {
34
- return "1.7.1";
34
+ return "1.7.4";
35
35
  }
36
36
 
37
37
  /**
@@ -25,7 +25,7 @@ export class AffiseDebug {
25
25
  * Debug get version of flutter library
26
26
  */
27
27
  version() {
28
- return "1.7.1";
28
+ return "1.7.4";
29
29
  }
30
30
 
31
31
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "affise-attribution-lib",
3
- "version": "1.7.1",
3
+ "version": "1.7.4",
4
4
  "description": "Affise Attribution Library",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",
@@ -7,7 +7,7 @@ import type { AffiseDebugApi } from "./AffiseDebugApi";
7
7
  export class AffiseDebug implements AffiseDebugApi {
8
8
  private native: AffiseNative
9
9
 
10
- constructor(native: AffiseNative) {
10
+ constructor(native: AffiseNative) {
11
11
  this.native = native
12
12
  }
13
13
 
@@ -28,12 +28,12 @@ export class AffiseDebug implements AffiseDebugApi {
28
28
  network(callback: DebugOnNetworkCallback) {
29
29
  this.native.network(callback);
30
30
  }
31
-
31
+
32
32
  /**
33
33
  * Debug get version of flutter library
34
34
  */
35
35
  version(): string {
36
- return "1.7.1";
36
+ return "1.7.4";
37
37
  }
38
38
 
39
39
  /**
@@ -42,4 +42,4 @@ export class AffiseDebug implements AffiseDebugApi {
42
42
  versionNative(): Promise<string> {
43
43
  return this.native.versionNative();
44
44
  }
45
- }
45
+ }