apps-sdk 1.1.24 → 1.1.25

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "apps-sdk",
3
- "version": "1.1.24",
3
+ "version": "1.1.25",
4
4
  "description": "Apps SDK",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -4,12 +4,12 @@ import { default as storage } from './Storage';
4
4
  import Session from './Session';
5
5
  import {Platform} from "react-native";
6
6
  import Networking from './Networking';
7
- import {MixPanel} from "./index";
7
+ import {Adapty, MixPanel} from "./index";
8
8
 
9
9
  class AdJust {
10
10
  sdkVersion = null;
11
11
  attribution = {};
12
- async initialize(adjustToken = null) {
12
+ async initialize(adjustToken = null, sendAttributionToAdapty = false) {
13
13
  const adjustEnvironment = config.ADJUST.ENVIRONMENT === 'SANDBOX' ? AdjustConfig.EnvironmentSandbox : AdjustConfig.EnvironmentProduction;
14
14
  const adjustLogLevel = config.ADJUST.LOG_LEVEL === 'VERBOSE' ? AdjustConfig.LogLevelVerbose : AdjustConfig.LogLevelSuppress;
15
15
  console.log("Initializing AdJust. Environment: " + adjustEnvironment + ", Log level: " + adjustLogLevel + ", config.TRACKING_ACTIVE: " + config.TRACKING_ACTIVE);
@@ -21,6 +21,9 @@ class AdJust {
21
21
  adjustConfig.setAttributionCallback(function (attribution) {
22
22
  self.attribution = attribution;
23
23
  Networking.sendEvent('other', 'adjust_attribution_received', attribution, true);
24
+ if (sendAttributionToAdapty && Adapty.isActivated()) {
25
+ Adapty.updateAdjustAttributionData(attribution);
26
+ }
24
27
  setTimeout(() => {
25
28
  self.sendAttributionData(attribution);
26
29
  }, 30000);
package/types/index.d.ts CHANGED
@@ -167,7 +167,7 @@ declare module 'apps-sdk' {
167
167
  export class AdJust {
168
168
  sdkVersion: string | null;
169
169
  attribution: object;
170
- initialize(adjustToken?: string): Promise<void>;
170
+ initialize(adjustToken?: string, sendAttributionToAdapty?: boolean): Promise<void>;
171
171
  updateAttributionInfo(): void;
172
172
  getAttributionData(): Promise<any>;
173
173
  sendAttributionData(attribution: any): Promise<void>;