A fully open source & end-to-end encrypted note taking alternative to Evernote.
TypeScript asp-net-coredotnet-coreelectronfosshacktoberfestnote-managmentnote-takingnote-taking-appnotebooknotesnotes-appopen-sourceopensourceprivacyproductivityreactreact-nativereactjsself-hosted
mobile: iap upgrade (#1361)
Ammar Ahmedfe4a16f182e7
diff --git a/apps/mobile/app/services/premium.js b/apps/mobile/app/services/premium.jsindex 0883ffe15..248be1a9c 100644--- a/apps/mobile/app/services/premium.js+++ b/apps/mobile/app/services/premium.js@@ -309,7 +309,8 @@ const subscriptions = {subscription = _subscriptions.length > 0 ? _subscriptions[0] : null;}if (subscription) {- await RNIap.finishTransactionIOS(subscription.transactionId);++ await RNIap.finishTransaction(subscription.transactionId);await RNIap.clearTransactionIOS();await subscriptions.remove(subscription.transactionId);}diff --git a/apps/mobile/native/android/app/build.gradle b/apps/mobile/native/android/app/build.gradleindex 823db3de6..9b1c5dd81 100644--- a/apps/mobile/native/android/app/build.gradle+++ b/apps/mobile/native/android/app/build.gradle@@ -164,6 +164,7 @@ android {versionName getNpmVersion()testBuildType System.getProperty('testBuildType', 'debug')testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'+ missingDimensionStrategy "store", "play"buildConfigField "boolean", "IS_NEW_ARCHITECTURE_ENABLED", isNewArchitectureEnabled().toString()if (isNewArchitectureEnabled()) {// We configure the NDK build only if you decide to opt-in for the New Architecture.diff --git a/apps/mobile/native/package.json b/apps/mobile/native/package.jsonindex 0ea8c4a4a..fcedc9eb6 100644--- a/apps/mobile/native/package.json+++ b/apps/mobile/native/package.json@@ -34,7 +34,7 @@"react-native-gesture-handler": "^2.5.0","react-native-get-random-values": "^1.7.0","react-native-html-to-pdf-lite": "^0.9.1",- "react-native-iap": "5.2.14",+ "react-native-iap": "7.5.6","react-native-image-picker": "4.1.2","react-native-keychain": "4.0.5","react-native-mmkv-storage": "^0.8.0",diff --git a/apps/mobile/package-lock.json b/apps/mobile/package-lock.jsonindex c50cca50d..f0799d230 100644--- a/apps/mobile/package-lock.json+++ b/apps/mobile/package-lock.json@@ -87,7 +87,7 @@"react-native-get-random-values": "^1.7.0","react-native-gzip": "1.0.0","react-native-html-to-pdf-lite": "^0.9.1",- "react-native-iap": "5.2.14",+ "react-native-iap": "7.5.6","react-native-image-picker": "4.1.2","react-native-keychain": "4.0.5","react-native-mmkv-storage": "^0.8.0",@@ -18310,14 +18310,14 @@"integrity": "sha512-HeD7YDHO7pL/4n/lAJCo1L4x0+JeKiME95B8jwH8lGBzkcHNX1hmb+CFM9SGSI//YtUL/a2sQjjkkoh6Cf7GNw=="},"node_modules/react-native-iap": {- "version": "5.2.14",- "resolved": "https://registry.npmjs.org/react-native-iap/-/react-native-iap-5.2.14.tgz",- "integrity": "sha512-knxdKfVZjhkIhLTwTqA9GKZ5/4oLuRfriKsLINFWCSiVJ/NOB/kEI6m5w3L5ZvIf2c2Bv+a6mH2sYSNvouB2Tg==",+ "version": "7.5.6",+ "resolved": "https://registry.npmjs.org/react-native-iap/-/react-native-iap-7.5.6.tgz",+ "integrity": "sha512-ua+KTq7NO+/Rw+S9cGDZizR45AdmpQ0LEx9gSubbRD3f5KSTp91mEMHgdyVcqUcxiBuVgRTfv3zy9mbPEdo8Mg==","dependencies": {- "dooboolab-welcome": "^1.2.0"+ "dooboolab-welcome": "1.3.2"},"peerDependencies": {- "react": "*",+ "react": ">=16.13.1","react-native": ">=0.54"}},@@ -24309,7 +24309,7 @@"react-native-get-random-values": "^1.7.0","react-native-gzip": "1.0.0","react-native-html-to-pdf-lite": "^0.9.1",- "react-native-iap": "5.2.14",+ "react-native-iap": "7.5.6","react-native-image-picker": "4.1.2","react-native-keychain": "4.0.5","react-native-mmkv-storage": "^0.8.0",@@ -35021,11 +35021,11 @@"integrity": "sha512-HeD7YDHO7pL/4n/lAJCo1L4x0+JeKiME95B8jwH8lGBzkcHNX1hmb+CFM9SGSI//YtUL/a2sQjjkkoh6Cf7GNw=="},"react-native-iap": {- "version": "5.2.14",- "resolved": "https://registry.npmjs.org/react-native-iap/-/react-native-iap-5.2.14.tgz",- "integrity": "sha512-knxdKfVZjhkIhLTwTqA9GKZ5/4oLuRfriKsLINFWCSiVJ/NOB/kEI6m5w3L5ZvIf2c2Bv+a6mH2sYSNvouB2Tg==",+ "version": "7.5.6",+ "resolved": "https://registry.npmjs.org/react-native-iap/-/react-native-iap-7.5.6.tgz",+ "integrity": "sha512-ua+KTq7NO+/Rw+S9cGDZizR45AdmpQ0LEx9gSubbRD3f5KSTp91mEMHgdyVcqUcxiBuVgRTfv3zy9mbPEdo8Mg==","requires": {- "dooboolab-welcome": "^1.2.0"+ "dooboolab-welcome": "1.3.2"}},"react-native-image-pan-zoom": {diff --git a/apps/mobile/patches/react-native-iap+5.2.14.patch b/apps/mobile/patches/react-native-iap+5.2.14.patchdeleted file mode 100644index ec0748710..000000000--- a/apps/mobile/patches/react-native-iap+5.2.14.patch+++ /dev/null@@ -1,21 +0,0 @@-diff --git a/node_modules/react-native-iap/android/src/main/java/com/dooboolab/RNIap/RNIapModule.java b/node_modules/react-native-iap/android/src/main/java/com/dooboolab/RNIap/RNIapModule.java-index 0a77a6a..43df636 100644---- a/node_modules/react-native-iap/android/src/main/java/com/dooboolab/RNIap/RNIapModule.java-+++ b/node_modules/react-native-iap/android/src/main/java/com/dooboolab/RNIap/RNIapModule.java-@@ -74,6 +74,16 @@ public class RNIapModule extends ReactContextBaseJavaModule implements Purchases- }- };--+ @ReactMethod-+ public void addListener(String eventName) {-+ // Keep: Required for RN built in Event Emitter Calls.-+ }-+-+ @ReactMethod-+ public void removeListeners(double count) {-+ // Keep: Required for RN built in Event Emitter Calls.-+ }-+- public RNIapModule(ReactApplicationContext reactContext) {- super(reactContext);- this.reactContext = reactContext;