apps-sdk 1.0.60 → 1.0.62

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/config.js CHANGED
@@ -3,7 +3,7 @@ export var ENDPOINTS = {
3
3
  PAYMENT_CARD: "https://backend.ailandsapp.com/payment-card",
4
4
  EVENTS_PUSH: "https://backend.ailandsapp.com/event/push",
5
5
  ATTRIBUTION_SET_ID: "https://backend.ailandsapp.com/user/set-attribution-data",
6
- SET_ATTRIBUTION_DATA: "https://backend.ailandsapp.com/user/set-attribution-data",
6
+ ATTRIBUTION_SET_DATA: "https://backend.ailandsapp.com/user/set-adjust-data",
7
7
  USER_CREATE_ID: "https://backend.ailandsapp.com/user/create-id",
8
8
  NOTIFICATION_SET_TOKEN: "https://backend.ailandsapp.com/user/notification-token",
9
9
  CONFIG: "https://backend.ailandsapp.com/core/config",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "apps-sdk",
3
- "version": "1.0.60",
3
+ "version": "1.0.62",
4
4
  "description": "Apps SDK",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -1,4 +1,4 @@
1
- import { Adjust, AdjustEvent, AdjustConfig, AdjustPlayStoreSubscription, AdjustAppStoreSubscription, AdjustAttribution } from 'react-native-adjust';
1
+ import { Adjust, AdjustEvent, AdjustConfig, AdjustPlayStoreSubscription, AdjustAppStoreSubscription } from 'react-native-adjust';
2
2
  import * as config from '../../config';
3
3
  import { default as storage } from './Storage';
4
4
  import Session from './Session';
@@ -59,7 +59,7 @@ class AdJust {
59
59
  }
60
60
  }
61
61
  console.log('sendAttributionData', data);
62
- Networking.request(config.ENDPOINTS.SET_ATTRIBUTION_DATA, data);
62
+ Networking.request(config.ENDPOINTS.ATTRIBUTION_SET_DATA, data);
63
63
  }
64
64
 
65
65
  trackEventIfExist(eventKeyword, eventValue= 0) {
@@ -48,13 +48,12 @@ class NotificationsPush {
48
48
  });
49
49
  }
50
50
  const { status: existingStatus } = await Notifications.getPermissionsAsync();
51
+ let finalStatus = existingStatus;
51
52
  if (existingStatus !== 'granted') {
52
- const{status} = await Notifications.requestPermissionsAsync();
53
- if (status === 'granted') {
54
- Networking.sendEvent('action', 'allow_notifications');
55
- }
53
+ const { status } = await Notifications.requestPermissionsAsync();
54
+ finalStatus = status;
56
55
  }
57
- if (existingStatus === 'granted') {
56
+ if (finalStatus === 'granted') {
58
57
  token = (await Notifications.getExpoPushTokenAsync({"projectId": Constants.expoConfig.extra.eas.projectId})).data;
59
58
  console.log('Notification token',token);
60
59
  if(token) {
@@ -21,8 +21,8 @@ class Session {
21
21
  await this.storeSessionStructure();
22
22
  await this.checkUserID();
23
23
  this.sessionID = this.generateSessionID();
24
- await this.checkFirstOpen();
25
24
  await Networking.executeInit();
25
+ await this.checkFirstOpen();
26
26
  }
27
27
 
28
28
  storeSessionStructure = async () => {