react-native-rate-app 1.2.1 → 1.2.2

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/README.md CHANGED
@@ -38,11 +38,23 @@ or
38
38
  npm install react-native-rate-app
39
39
  ```
40
40
 
41
- ## iOS Setup
41
+ ## Expo
42
+
43
+ For Expo projects, you can use the Expo plugin in `app.json`
44
+
45
+ ```json
46
+ "plugins": [
47
+ "react-native-rate-app"
48
+ ],
49
+ ```
50
+
51
+ ## Bare RN
52
+
53
+ ### iOS Setup
42
54
 
43
55
  To use the in-app review functionality on iOS, you need to add the `StoreKit` framework to your project and update your `Info.plist` file.
44
56
 
45
- ### Adding the StoreKit Framework
57
+ #### Adding the StoreKit Framework
46
58
 
47
59
  1. Open your project in Xcode.
48
60
  2. Select your project in the Project Navigator.
@@ -51,7 +63,7 @@ To use the in-app review functionality on iOS, you need to add the `StoreKit` fr
51
63
  5. Expand the "Link Binary With Libraries" section.
52
64
  6. Click the "+" button and add `StoreKit.framework`.
53
65
 
54
- ### Updating Info.plist
66
+ #### Updating Info.plist
55
67
 
56
68
  To allow your app to open the App Store and handle the in-app review functionality, you need to add the `LSApplicationQueriesSchemes` key to your `Info.plist` file.
57
69
 
@@ -14,7 +14,12 @@ var _configPlugins = require("@expo/config-plugins");
14
14
  */
15
15
  const withCustomInfoPlist = config => {
16
16
  return (0, _configPlugins.withInfoPlist)(config, config => {
17
- config.modResults.LSApplicationQueriesSchemes = ["itms-apps"];
17
+ if (!config.modResults.LSApplicationQueriesSchemes) {
18
+ config.modResults.LSApplicationQueriesSchemes = [];
19
+ }
20
+ if (!config.modResults.LSApplicationQueriesSchemes.includes("itms-apps")) {
21
+ config.modResults.LSApplicationQueriesSchemes.push("itms-apps");
22
+ }
18
23
  return config;
19
24
  });
20
25
  };
@@ -1 +1 @@
1
- {"version":3,"names":["_configPlugins","require","withCustomInfoPlist","config","withInfoPlist","modResults","LSApplicationQueriesSchemes","withStoreKitFramework","withXcodeProject","addFramework","required","withReactNativeRateApp","configWithInfoPlist","configWithStoreKit","_default","exports","default"],"sourceRoot":"../../../src","sources":["plugin/withReactNativeRateApp.ts"],"mappings":";;;;;;AAAA,IAAAA,cAAA,GAAAC,OAAA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,mBAAiC,GAAIC,MAAM,IAAK;EACpD,OAAO,IAAAC,4BAAa,EAACD,MAAM,EAAGA,MAAM,IAAK;IACvCA,MAAM,CAACE,UAAU,CAACC,2BAA2B,GAAG,CAAC,WAAW,CAAC;IAC7D,OAAOH,MAAM;EACf,CAAC,CAAC;AACJ,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMI,qBAAmC,GAAIJ,MAAM,IAAK;EACtD,OAAO,IAAAK,+BAAgB,EAACL,MAAM,EAAGA,MAAM,IAAK;IAC1CA,MAAM,CAACE,UAAU,CAACI,YAAY,CAAC,oBAAoB,EAAE;MAAEC,QAAQ,EAAE;IAAK,CAAC,CAAC;IACxE,OAAOP,MAAM;EACf,CAAC,CAAC;AACJ,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMQ,sBAAoC,GAAIR,MAAM,IAAK;EACvD,MAAMS,mBAAmB,GAAGV,mBAAmB,CAACC,MAAM,CAAC;EACvD,MAAMU,kBAAkB,GAAGN,qBAAqB,CAACK,mBAAmB,CAAC;EACrE,OAAOC,kBAAkB;AAC3B,CAAC;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEaL,sBAAsB","ignoreList":[]}
1
+ {"version":3,"names":["_configPlugins","require","withCustomInfoPlist","config","withInfoPlist","modResults","LSApplicationQueriesSchemes","includes","push","withStoreKitFramework","withXcodeProject","addFramework","required","withReactNativeRateApp","configWithInfoPlist","configWithStoreKit","_default","exports","default"],"sourceRoot":"../../../src","sources":["plugin/withReactNativeRateApp.ts"],"mappings":";;;;;;AAAA,IAAAA,cAAA,GAAAC,OAAA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,mBAAiC,GAAIC,MAAM,IAAK;EACpD,OAAO,IAAAC,4BAAa,EAACD,MAAM,EAAGA,MAAM,IAAK;IACvC,IAAI,CAACA,MAAM,CAACE,UAAU,CAACC,2BAA2B,EAAE;MAClDH,MAAM,CAACE,UAAU,CAACC,2BAA2B,GAAG,EAAE;IACpD;IACA,IAAI,CAACH,MAAM,CAACE,UAAU,CAACC,2BAA2B,CAACC,QAAQ,CAAC,WAAW,CAAC,EAAE;MACxEJ,MAAM,CAACE,UAAU,CAACC,2BAA2B,CAACE,IAAI,CAAC,WAAW,CAAC;IACjE;IACA,OAAOL,MAAM;EACf,CAAC,CAAC;AACJ,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMM,qBAAmC,GAAIN,MAAM,IAAK;EACtD,OAAO,IAAAO,+BAAgB,EAACP,MAAM,EAAGA,MAAM,IAAK;IAC1CA,MAAM,CAACE,UAAU,CAACM,YAAY,CAAC,oBAAoB,EAAE;MAAEC,QAAQ,EAAE;IAAK,CAAC,CAAC;IACxE,OAAOT,MAAM;EACf,CAAC,CAAC;AACJ,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMU,sBAAoC,GAAIV,MAAM,IAAK;EACvD,MAAMW,mBAAmB,GAAGZ,mBAAmB,CAACC,MAAM,CAAC;EACvD,MAAMY,kBAAkB,GAAGN,qBAAqB,CAACK,mBAAmB,CAAC;EACrE,OAAOC,kBAAkB;AAC3B,CAAC;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEaL,sBAAsB","ignoreList":[]}
@@ -10,7 +10,12 @@ import { withInfoPlist, withXcodeProject } from "@expo/config-plugins";
10
10
  */
11
11
  const withCustomInfoPlist = config => {
12
12
  return withInfoPlist(config, config => {
13
- config.modResults.LSApplicationQueriesSchemes = ["itms-apps"];
13
+ if (!config.modResults.LSApplicationQueriesSchemes) {
14
+ config.modResults.LSApplicationQueriesSchemes = [];
15
+ }
16
+ if (!config.modResults.LSApplicationQueriesSchemes.includes("itms-apps")) {
17
+ config.modResults.LSApplicationQueriesSchemes.push("itms-apps");
18
+ }
14
19
  return config;
15
20
  });
16
21
  };
@@ -1 +1 @@
1
- {"version":3,"names":["withInfoPlist","withXcodeProject","withCustomInfoPlist","config","modResults","LSApplicationQueriesSchemes","withStoreKitFramework","addFramework","required","withReactNativeRateApp","configWithInfoPlist","configWithStoreKit"],"sourceRoot":"../../../src","sources":["plugin/withReactNativeRateApp.ts"],"mappings":";;AAAA,SAASA,aAAa,EAAEC,gBAAgB,QAAQ,sBAAsB;AAGtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,mBAAiC,GAAIC,MAAM,IAAK;EACpD,OAAOH,aAAa,CAACG,MAAM,EAAGA,MAAM,IAAK;IACvCA,MAAM,CAACC,UAAU,CAACC,2BAA2B,GAAG,CAAC,WAAW,CAAC;IAC7D,OAAOF,MAAM;EACf,CAAC,CAAC;AACJ,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMG,qBAAmC,GAAIH,MAAM,IAAK;EACtD,OAAOF,gBAAgB,CAACE,MAAM,EAAGA,MAAM,IAAK;IAC1CA,MAAM,CAACC,UAAU,CAACG,YAAY,CAAC,oBAAoB,EAAE;MAAEC,QAAQ,EAAE;IAAK,CAAC,CAAC;IACxE,OAAOL,MAAM;EACf,CAAC,CAAC;AACJ,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMM,sBAAoC,GAAIN,MAAM,IAAK;EACvD,MAAMO,mBAAmB,GAAGR,mBAAmB,CAACC,MAAM,CAAC;EACvD,MAAMQ,kBAAkB,GAAGL,qBAAqB,CAACI,mBAAmB,CAAC;EACrE,OAAOC,kBAAkB;AAC3B,CAAC;AAED,eAAeF,sBAAsB","ignoreList":[]}
1
+ {"version":3,"names":["withInfoPlist","withXcodeProject","withCustomInfoPlist","config","modResults","LSApplicationQueriesSchemes","includes","push","withStoreKitFramework","addFramework","required","withReactNativeRateApp","configWithInfoPlist","configWithStoreKit"],"sourceRoot":"../../../src","sources":["plugin/withReactNativeRateApp.ts"],"mappings":";;AAAA,SAASA,aAAa,EAAEC,gBAAgB,QAAQ,sBAAsB;AAGtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,mBAAiC,GAAIC,MAAM,IAAK;EACpD,OAAOH,aAAa,CAACG,MAAM,EAAGA,MAAM,IAAK;IACvC,IAAI,CAACA,MAAM,CAACC,UAAU,CAACC,2BAA2B,EAAE;MAClDF,MAAM,CAACC,UAAU,CAACC,2BAA2B,GAAG,EAAE;IACpD;IACA,IAAI,CAACF,MAAM,CAACC,UAAU,CAACC,2BAA2B,CAACC,QAAQ,CAAC,WAAW,CAAC,EAAE;MACxEH,MAAM,CAACC,UAAU,CAACC,2BAA2B,CAACE,IAAI,CAAC,WAAW,CAAC;IACjE;IACA,OAAOJ,MAAM;EACf,CAAC,CAAC;AACJ,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMK,qBAAmC,GAAIL,MAAM,IAAK;EACtD,OAAOF,gBAAgB,CAACE,MAAM,EAAGA,MAAM,IAAK;IAC1CA,MAAM,CAACC,UAAU,CAACK,YAAY,CAAC,oBAAoB,EAAE;MAAEC,QAAQ,EAAE;IAAK,CAAC,CAAC;IACxE,OAAOP,MAAM;EACf,CAAC,CAAC;AACJ,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMQ,sBAAoC,GAAIR,MAAM,IAAK;EACvD,MAAMS,mBAAmB,GAAGV,mBAAmB,CAACC,MAAM,CAAC;EACvD,MAAMU,kBAAkB,GAAGL,qBAAqB,CAACI,mBAAmB,CAAC;EACrE,OAAOC,kBAAkB;AAC3B,CAAC;AAED,eAAeF,sBAAsB","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"withReactNativeRateApp.d.ts","sourceRoot":"","sources":["../../../src/plugin/withReactNativeRateApp.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AA8BxD;;;;;;GAMG;AACH,QAAA,MAAM,sBAAsB,EAAE,YAI7B,CAAC;AAEF,eAAe,sBAAsB,CAAC"}
1
+ {"version":3,"file":"withReactNativeRateApp.d.ts","sourceRoot":"","sources":["../../../src/plugin/withReactNativeRateApp.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAmCxD;;;;;;GAMG;AACH,QAAA,MAAM,sBAAsB,EAAE,YAI7B,CAAC;AAEF,eAAe,sBAAsB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-rate-app",
3
- "version": "1.2.1",
3
+ "version": "1.2.2",
4
4
  "description": "React Native module for In App Rating on Android and iOS",
5
5
  "source": "src/index.tsx",
6
6
  "main": "lib/commonjs/index.js",
@@ -99,7 +99,7 @@
99
99
  "workspaces": [
100
100
  "example"
101
101
  ],
102
- "packageManager": "yarn@3.8.7",
102
+ "packageManager": "yarn@4.6.0",
103
103
  "jest": {
104
104
  "preset": "react-native",
105
105
  "modulePathIgnorePatterns": [
@@ -113,8 +113,7 @@
113
113
  "src/**/*.ts",
114
114
  "src/**/*.tsx",
115
115
  "!src/types.ts",
116
- "!src/NativeRateApp.ts",
117
- "!src/plugin/**"
116
+ "!src/NativeRateApp.ts"
118
117
  ],
119
118
  "collectCoverage": true
120
119
  },
@@ -10,7 +10,12 @@ import type { ConfigPlugin } from "expo/config-plugins";
10
10
  */
11
11
  const withCustomInfoPlist: ConfigPlugin = (config) => {
12
12
  return withInfoPlist(config, (config) => {
13
- config.modResults.LSApplicationQueriesSchemes = ["itms-apps"];
13
+ if (!config.modResults.LSApplicationQueriesSchemes) {
14
+ config.modResults.LSApplicationQueriesSchemes = [];
15
+ }
16
+ if (!config.modResults.LSApplicationQueriesSchemes.includes("itms-apps")) {
17
+ config.modResults.LSApplicationQueriesSchemes.push("itms-apps");
18
+ }
14
19
  return config;
15
20
  });
16
21
  };