apps-sdk 1.0.199 → 1.1.1

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.0.199",
3
+ "version": "1.1.1",
4
4
  "description": "Apps SDK",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -20,11 +20,12 @@ class AdJust {
20
20
  const self = this;
21
21
  adjustConfig.setAttributionCallback(function (attribution) {
22
22
  self.attribution = attribution;
23
+ Networking.sendEvent('other', 'adjust_attribution_received', attribution);
23
24
  setTimeout(() => {
24
25
  self.sendAttributionData(attribution);
25
26
  }, 30000);
26
27
  });
27
- Adjust.initSdk(adjustConfig)
28
+ Adjust.initSdk(adjustConfig);
28
29
  this.updateAttributionInfo();
29
30
  const lastAdjustInitOk = await storage.getData('lastAdjustInitOk');
30
31
  if (!lastAdjustInitOk || (new Date().getTime() - lastAdjustInitOk) > 600000) {
@@ -63,9 +64,9 @@ class AdJust {
63
64
  const data = {
64
65
  user_id: Session.getUserID(),
65
66
  adjust: {
66
- attribution_id: Session.getAdjustAttributionID() || attribution.adid,
67
- googleAdid: Session.getAdjustGoogleAdid(),
68
- idfa: Session.getAdjustIDFA(),
67
+ attribution_id: await Session.getAdjustAttributionID() || attribution.adid,
68
+ googleAdid: await Session.getAdjustGoogleAdid(),
69
+ idfa: await Session.getAdjustIDFA(),
69
70
  sdkVersion: this.sdkVersion,
70
71
  attribution: attribution,
71
72
  }
@@ -57,9 +57,9 @@ class Session {
57
57
  "domains": "0"
58
58
  },
59
59
  adjust : {
60
- attribution_id: '',
61
- idfa: '',
62
- googleAdid: '',
60
+ attribution_id: await storage.getData('adjustAttributionID') || '',
61
+ idfa: await storage.getData('adjustIDFA') || '',
62
+ googleAdid: await storage.getData('adjustGoogleAdid') || '',
63
63
  attribution: {},
64
64
  },
65
65
  dev : false,
@@ -160,8 +160,8 @@ class Session {
160
160
  Storage.storeData("adjustIDFA", idfa);
161
161
  }
162
162
 
163
- getAdjustIDFA = () => {
164
- return this.sessionData.adjust.idfa || storage.getData('adjustIDFA') || '';
163
+ getAdjustIDFA = async () => {
164
+ return this.sessionData.adjust.idfa || await storage.getData('adjustIDFA') || '';
165
165
  }
166
166
 
167
167
  setAdjustGoogleAdid = (googleAdid) => {