apps-sdk 1.0.49 → 1.0.50

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.49",
3
+ "version": "1.0.50",
4
4
  "description": "Apps SDK",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -1,4 +1,4 @@
1
- import { requestTrackingPermissionsAsync } from 'expo-tracking-transparency';
1
+ import * as ExpoTrackingTransparency from 'expo-tracking-transparency';
2
2
  import Storage from './Storage';
3
3
  import Networking from './Networking';
4
4
 
@@ -6,7 +6,7 @@ class TrackingTransparency {
6
6
  async requestTrackingTransparencyPermission() {
7
7
  let trackingPermission = await Storage.getData('TRACKING_PERMISSION');
8
8
  if (!trackingPermission || trackingPermission !== 'granted') {
9
- const { status } = await requestTrackingPermissionsAsync();
9
+ const { status } = await ExpoTrackingTransparency.requestTrackingPermissionsAsync();
10
10
  if (status === 'granted') {
11
11
  Storage.storeData('TRACKING_PERMISSION', 'granted');
12
12
  Networking.sendEvent('action', 'tracking_consent');
@@ -18,6 +18,10 @@ class TrackingTransparency {
18
18
  }
19
19
  }
20
20
  }
21
+
22
+ async getAdvertisingIdentifier() {
23
+ return ExpoTrackingTransparency.getAdvertisingId();
24
+ }
21
25
  }
22
26
 
23
27
  export default new TrackingTransparency();
package/types/index.d.ts CHANGED
@@ -112,6 +112,7 @@ declare module 'apps-sdk' {
112
112
 
113
113
  export class TrackingTransparency {
114
114
  requestTrackingTransparencyPermission(): Promise<string>;
115
+ getAdvertisingIdentifier(): Promise<string>;
115
116
  }
116
117
 
117
118
  export class AppsSDK {