apps-sdk 1.1.61 → 1.1.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "apps-sdk",
3
- "version": "1.1.61",
3
+ "version": "1.1.62",
4
4
  "description": "Apps SDK",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -8,14 +8,45 @@ class Rating {
8
8
  if (force || (await this.requestReviewIfNeeded())) {
9
9
  if (await StoreReview.hasAction()) {
10
10
  if (await StoreReview.isAvailableAsync()) {
11
- return await StoreReview.requestReview();
11
+ await StoreReview.requestReview();
12
+ return {
13
+ success: true,
14
+ shown: true,
15
+ message: 'Review dialog shown successfully'
16
+ };
17
+ } else {
18
+ return {
19
+ success: false,
20
+ shown: false,
21
+ blocked: true,
22
+ message: 'Review dialog not available (possibly blocked by OS)'
23
+ };
12
24
  }
25
+ } else {
26
+ return {
27
+ success: false,
28
+ shown: false,
29
+ blocked: true,
30
+ message: 'Store review not supported on this device'
31
+ };
13
32
  }
14
33
  } else {
15
34
  console.log("Rating requestReviewIfNeeded not needed");
35
+ return {
36
+ success: false,
37
+ shown: false,
38
+ tooSoon: true,
39
+ message: 'Review request too soon (less than 7 days since last request)'
40
+ };
16
41
  }
17
42
  } catch (error) {
18
43
  console.log("Error en requestReview", error);
44
+ return {
45
+ success: false,
46
+ shown: false,
47
+ error: true,
48
+ message: error.message
49
+ };
19
50
  }
20
51
  }
21
52