apps-sdk 1.0.44 → 1.0.45
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/index.js +2 -1
- package/package.json +3 -2
- package/src/components/PayWall.js +1 -1
- package/src/libraries/Rating.js +17 -0
- package/src/libraries/index.js +1 -0
- package/types/index.d.ts +4 -0
package/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {NotificationsPush, Networking, Storage, Session, Utils, PayWallLogic} from "./src/libraries";
|
|
1
|
+
import {NotificationsPush, Networking, Storage, Session, Utils, PayWallLogic, Rating} from "./src/libraries";
|
|
2
2
|
import PayWall from "./src/components/PayWall";
|
|
3
3
|
|
|
4
4
|
class AppsSDK {
|
|
@@ -18,6 +18,7 @@ export default {
|
|
|
18
18
|
storage: Storage,
|
|
19
19
|
session: Session,
|
|
20
20
|
utils: Utils,
|
|
21
|
+
rating: Rating,
|
|
21
22
|
paywallLogic: PayWallLogic,
|
|
22
23
|
paywall: PayWall,
|
|
23
24
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "apps-sdk",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.45",
|
|
4
4
|
"description": "Apps SDK",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -21,7 +21,8 @@
|
|
|
21
21
|
"react-native": "^0.73.2",
|
|
22
22
|
"react-native-btr": "^2.2.1",
|
|
23
23
|
"react-native-iap": "^12.12.2",
|
|
24
|
-
"react-native-webview": "^13.8.1"
|
|
24
|
+
"react-native-webview": "^13.8.1",
|
|
25
|
+
"expo-store-review": "~6.8.3"
|
|
25
26
|
},
|
|
26
27
|
"types": "./types/index.d.ts"
|
|
27
28
|
}
|
|
@@ -59,7 +59,7 @@ class PayWall extends React.Component {
|
|
|
59
59
|
eventClickSubscribe = (data) => {
|
|
60
60
|
Networking.sendEvent('action', 'cta');
|
|
61
61
|
if (this.paywallData && this.paywallData.products_id && this.paywallData.products_id.length > 0) {
|
|
62
|
-
let subscribed =
|
|
62
|
+
let subscribed = PayWallLogic.executePurchase(this.paywallData.products_id[0]);
|
|
63
63
|
console.log('subscribed',subscribed)
|
|
64
64
|
}
|
|
65
65
|
setTimeout(() => {
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as StoreReview from 'expo-store-review';
|
|
2
|
+
|
|
3
|
+
class Rating {
|
|
4
|
+
showRatingDialog = async () => {
|
|
5
|
+
try {
|
|
6
|
+
if (await StoreReview.hasAction()) {
|
|
7
|
+
if (await StoreReview.isAvailableAsync()) {
|
|
8
|
+
return await StoreReview.requestReview();
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
} catch (error) {
|
|
12
|
+
console.log("Error en requestReview", error);
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export default new Rating();
|
package/src/libraries/index.js
CHANGED
|
@@ -3,4 +3,5 @@ export { default as Networking } from './Networking';
|
|
|
3
3
|
export { default as Storage } from './Storage';
|
|
4
4
|
export { default as Session } from './Session';
|
|
5
5
|
export { default as Utils } from './Utils';
|
|
6
|
+
export { default as Rating } from './Rating';
|
|
6
7
|
export { default as PayWallLogic } from './PayWallLogic';
|
package/types/index.d.ts
CHANGED
|
@@ -82,6 +82,10 @@ declare module 'apps-sdk' {
|
|
|
82
82
|
isBase64Image(str: string): boolean;
|
|
83
83
|
}
|
|
84
84
|
|
|
85
|
+
export class Rating {
|
|
86
|
+
showRatingDialog(): Promise<void>;
|
|
87
|
+
}
|
|
88
|
+
|
|
85
89
|
export class NotificationsPush {
|
|
86
90
|
initialize(): Promise<void>;
|
|
87
91
|
registerForPushNotificationsAsync(): Promise<string>;
|