apps-sdk 1.1.37 → 1.1.39
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 +23 -22
- package/src/libraries/Facebook.js +109 -109
- package/src/libraries/index.js +1 -1
- package/types/index.d.ts +7 -7
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "apps-sdk",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.39",
|
|
4
4
|
"description": "Apps SDK",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -9,36 +9,37 @@
|
|
|
9
9
|
"author": "ASD",
|
|
10
10
|
"license": "ISC",
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@
|
|
13
|
-
"@react-native-async-storage/async-storage": "1.23.1",
|
|
12
|
+
"@react-native-async-storage/async-storage": "2.2.0",
|
|
14
13
|
"@react-native-community/netinfo": "11.4.1",
|
|
15
14
|
"@react-native-voice/voice": "^3.2.4",
|
|
16
|
-
"
|
|
17
|
-
"expo": "~
|
|
18
|
-
"expo-
|
|
19
|
-
"expo-
|
|
20
|
-
"expo-
|
|
21
|
-
"expo-image-
|
|
22
|
-
"expo-
|
|
23
|
-
"expo-
|
|
24
|
-
"expo-
|
|
25
|
-
"expo-
|
|
26
|
-
"expo-notifications": "~0.29.14",
|
|
15
|
+
"expo": "^54.0.10",
|
|
16
|
+
"expo-constants": "~18.0.9",
|
|
17
|
+
"expo-device": "~8.0.8",
|
|
18
|
+
"expo-file-system": "~19.0.15",
|
|
19
|
+
"expo-image-manipulator": "~14.0.7",
|
|
20
|
+
"expo-image-picker": "~17.0.8",
|
|
21
|
+
"expo-linking": "~8.0.8",
|
|
22
|
+
"expo-localization": "~17.0.7",
|
|
23
|
+
"expo-media-library": "~18.2.0",
|
|
24
|
+
"expo-notifications": "~0.32.11",
|
|
27
25
|
"expo-quick-actions": "^4.0.2",
|
|
28
|
-
"expo-sharing": "~
|
|
29
|
-
"expo-speech": "~
|
|
30
|
-
"expo-store-review": "~
|
|
31
|
-
"expo-tracking-transparency": "~
|
|
26
|
+
"expo-sharing": "~14.0.7",
|
|
27
|
+
"expo-speech": "~14.0.7",
|
|
28
|
+
"expo-store-review": "~9.0.7",
|
|
29
|
+
"expo-tracking-transparency": "~6.0.7",
|
|
32
30
|
"franc-min": "^6.2.0",
|
|
33
31
|
"mixpanel-react-native": "^3.0.9",
|
|
34
|
-
"react
|
|
32
|
+
"react": "19.1.0",
|
|
33
|
+
"react-native": "0.81.4",
|
|
35
34
|
"react-native-adapty": "^3.11.1",
|
|
36
35
|
"react-native-adjust": "^5.0.2",
|
|
37
36
|
"react-native-btr": "^2.2.1",
|
|
38
|
-
"react-native-fbsdk-next": "^13.4.1",
|
|
39
37
|
"react-native-iap": "^12.13.0",
|
|
40
|
-
"react-native-webview": "13.
|
|
38
|
+
"react-native-webview": "13.15.0",
|
|
41
39
|
"semver": "^7.6.0"
|
|
42
40
|
},
|
|
43
|
-
"types": "./types/index.d.ts"
|
|
41
|
+
"types": "./types/index.d.ts",
|
|
42
|
+
"overrides": {
|
|
43
|
+
"@react-native-async-storage/async-storage": "2.2.0"
|
|
44
|
+
}
|
|
44
45
|
}
|
|
@@ -1,128 +1,128 @@
|
|
|
1
|
-
import { AppEventsLogger, Settings } from 'react-native-fbsdk-next';
|
|
2
|
-
import * as config from '../../config';
|
|
3
|
-
import Networking from "./Networking";
|
|
1
|
+
// import { AppEventsLogger, Settings } from 'react-native-fbsdk-next';
|
|
2
|
+
// import * as config from '../../config';
|
|
3
|
+
// import Networking from "./Networking";
|
|
4
4
|
|
|
5
|
-
/**
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
5
|
+
// /**
|
|
6
|
+
// * "react-native-fbsdk-next" events coding:
|
|
7
|
+
// * https://github.com/thebergamo/react-native-fbsdk-next/blob/master/src/FBAppEventsLogger.ts
|
|
8
|
+
// *
|
|
9
|
+
// * Facebook Standard and Custom events:
|
|
10
|
+
// * https://developers.facebook.com/docs/marketing-api/app-event-api/
|
|
11
|
+
// */
|
|
12
12
|
|
|
13
|
-
class Facebook {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
13
|
+
// class Facebook {
|
|
14
|
+
// constructor() {
|
|
15
|
+
// this.facebook = null;
|
|
16
|
+
// this.isInitialized = false;
|
|
17
|
+
// this.appId = null;
|
|
18
|
+
// this.clientToken = null;
|
|
19
|
+
// this.devMode = false;
|
|
20
|
+
// }
|
|
21
21
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
22
|
+
// async initialize(appId = null, clientToken = null, debugMode = false, devMode = false) {
|
|
23
|
+
// this.devMode = devMode;
|
|
24
|
+
// this.appId = appId || config.FACEBOOK.APP_ID;
|
|
25
|
+
// this.clientToken = clientToken || config.FACEBOOK.CLIENT_TOKEN;
|
|
26
26
|
|
|
27
|
-
|
|
27
|
+
// console.log('Initializing Facebook with appId: ' + this.appId);
|
|
28
28
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
29
|
+
// try {
|
|
30
|
+
// if (!this.appId || !this.clientToken) {
|
|
31
|
+
// console.error('Facebook initialize - Missing appId or clientToken');
|
|
32
|
+
// Networking.sendEvent('other', 'facebook_init_ko');
|
|
33
|
+
// return;
|
|
34
|
+
// }
|
|
35
35
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
36
|
+
// // Configure Facebook SDK
|
|
37
|
+
// Settings.setAppID(this.appId);
|
|
38
|
+
// Settings.setClientToken(this.clientToken);
|
|
39
|
+
// Settings.setAutoLogAppEventsEnabled(true);
|
|
40
40
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
41
|
+
// if (debugMode || config.FACEBOOK.DEBUG) {
|
|
42
|
+
// Settings.setAdvertiserIDCollectionEnabled(true);
|
|
43
|
+
// Settings.setAutoInitEnabled(true);
|
|
44
|
+
// }
|
|
45
45
|
|
|
46
|
-
|
|
46
|
+
// await Settings.initializeSDK();
|
|
47
47
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
48
|
+
// this.isInitialized = true;
|
|
49
|
+
// config.DEBUG_MODE && console.log('Facebook initialized: OK');
|
|
50
|
+
// Networking.sendEvent('other', 'facebook_init_ok');
|
|
51
|
+
// } catch (error) {
|
|
52
|
+
// console.error('Error initializing Facebook:', error);
|
|
53
|
+
// Networking.sendEvent('other', 'facebook_init_ko');
|
|
54
|
+
// }
|
|
55
|
+
// }
|
|
56
56
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
57
|
+
// async trackEvent(eventName, properties = {}) {
|
|
58
|
+
// if (!this.isInitialized) {
|
|
59
|
+
// console.log('Facebook is not initialized');
|
|
60
|
+
// return;
|
|
61
|
+
// }
|
|
62
62
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
63
|
+
// try {
|
|
64
|
+
// if (!this.devMode) {
|
|
65
|
+
// await AppEventsLogger.logEvent(eventName, properties);
|
|
66
|
+
// config.DEBUG_MODE && console.log(`Facebook Event tracked: ${eventName} with properties:`, properties);
|
|
67
|
+
// } else {
|
|
68
|
+
// config.DEBUG_MODE && console.log(`Facebook Event tracked but not send (DEV_MODE ON): ${eventName} with properties:`, properties);
|
|
69
|
+
// }
|
|
70
|
+
// } catch (error) {
|
|
71
|
+
// console.error('Error tracking event:', error);
|
|
72
|
+
// }
|
|
73
|
+
// }
|
|
74
74
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
75
|
+
// async trackEventIfExist(eventKeyword, eventData = {}) {
|
|
76
|
+
// if (config.EVENTS_FACEBOOK[eventKeyword]) {
|
|
77
|
+
// this.trackEvent(config.EVENTS_FACEBOOK[eventKeyword], eventData);
|
|
78
|
+
// } else {
|
|
79
|
+
// console.log("Event not found in Facebook, not sent: " + eventKeyword);
|
|
80
|
+
// }
|
|
81
|
+
// }
|
|
82
82
|
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
83
|
+
// async trackPurchase(valueToSum, currency, parameters = {}) {
|
|
84
|
+
// if (!this.isInitialized) {
|
|
85
|
+
// console.log('Facebook is not initialized');
|
|
86
|
+
// return;
|
|
87
|
+
// }
|
|
88
88
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
89
|
+
// try {
|
|
90
|
+
// if (!this.devMode) {
|
|
91
|
+
// await AppEventsLogger.logPurchase(valueToSum, currency, parameters);
|
|
92
|
+
// config.DEBUG_MODE && console.log(`Facebook Purchase tracked: ${valueToSum} ${currency} with parameters:`, parameters);
|
|
93
|
+
// } else {
|
|
94
|
+
// config.DEBUG_MODE && console.log(`Facebook Purchase tracked but not send (DEV_MODE ON): ${valueToSum} ${currency} with parameters:`, parameters);
|
|
95
|
+
// }
|
|
96
|
+
// } catch (error) {
|
|
97
|
+
// console.error('Error tracking purchase:', error);
|
|
98
|
+
// }
|
|
99
|
+
// }
|
|
100
100
|
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
101
|
+
// async trackPushNotificationOpen(payload = {}) {
|
|
102
|
+
// if (!this.isInitialized) {
|
|
103
|
+
// console.log('Facebook is not initialized');
|
|
104
|
+
// return;
|
|
105
|
+
// }
|
|
106
106
|
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
107
|
+
// try {
|
|
108
|
+
// if (!this.devMode) {
|
|
109
|
+
// await AppEventsLogger.logPushNotificationOpen(payload);
|
|
110
|
+
// config.DEBUG_MODE && console.log('Facebook Push Notification Open tracked with payload:', payload);
|
|
111
|
+
// } else {
|
|
112
|
+
// config.DEBUG_MODE && console.log('Facebook Push Notification Open tracked but not send (DEV_MODE ON) with payload:', payload);
|
|
113
|
+
// }
|
|
114
|
+
// } catch (error) {
|
|
115
|
+
// console.error('Error tracking push notification open:', error);
|
|
116
|
+
// }
|
|
117
|
+
// }
|
|
118
118
|
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
119
|
+
// isFacebookInitialized() {
|
|
120
|
+
// return this.isInitialized;
|
|
121
|
+
// }
|
|
122
122
|
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
}
|
|
123
|
+
// getApplicationId() {
|
|
124
|
+
// return this.appId;
|
|
125
|
+
// }
|
|
126
|
+
// }
|
|
127
127
|
|
|
128
|
-
export default new Facebook();
|
|
128
|
+
// export default new Facebook();
|
package/src/libraries/index.js
CHANGED
|
@@ -11,4 +11,4 @@ export { default as PayWallLogic } from './PayWallLogic';
|
|
|
11
11
|
export { default as Voice } from './Voice';
|
|
12
12
|
export { default as Adapty } from './Adapty';
|
|
13
13
|
export { default as HomeActions } from './QuickActions';
|
|
14
|
-
export { default as Facebook } from './Facebook';
|
|
14
|
+
// export { default as Facebook } from './Facebook';
|
package/types/index.d.ts
CHANGED
|
@@ -239,13 +239,13 @@ declare module 'apps-sdk' {
|
|
|
239
239
|
}
|
|
240
240
|
|
|
241
241
|
export class Facebook {
|
|
242
|
-
initialize(appId?: string, clientToken?: string, debugMode?: boolean, devMode?: boolean): Promise<void>;
|
|
243
|
-
trackEvent(eventName: string, properties?: object): Promise<void>;
|
|
244
|
-
trackEventIfExist(eventKeyword: string, eventData?: object): Promise<void>;
|
|
245
|
-
trackPurchase(valueToSum: number, currency: string, parameters?: object): Promise<void>;
|
|
246
|
-
trackPushNotificationOpen(payload?: object): Promise<void>;
|
|
247
|
-
isFacebookInitialized(): boolean;
|
|
248
|
-
getApplicationId(): string | null;
|
|
242
|
+
// initialize(appId?: string, clientToken?: string, debugMode?: boolean, devMode?: boolean): Promise<void>;
|
|
243
|
+
// trackEvent(eventName: string, properties?: object): Promise<void>;
|
|
244
|
+
// trackEventIfExist(eventKeyword: string, eventData?: object): Promise<void>;
|
|
245
|
+
// trackPurchase(valueToSum: number, currency: string, parameters?: object): Promise<void>;
|
|
246
|
+
// trackPushNotificationOpen(payload?: object): Promise<void>;
|
|
247
|
+
// isFacebookInitialized(): boolean;
|
|
248
|
+
// getApplicationId(): string | null;
|
|
249
249
|
}
|
|
250
250
|
|
|
251
251
|
export class AppsSDK {
|