react-native-rate-app 1.4.10 → 1.4.12

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.
@@ -0,0 +1,46 @@
1
+
2
+ /**
3
+ * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
4
+ *
5
+ * Do not edit this file as changes may cause incorrect behavior and will be lost
6
+ * once the code is regenerated.
7
+ *
8
+ * @generated by codegen project: GenerateModuleJavaSpec.js
9
+ *
10
+ * @nolint
11
+ */
12
+
13
+ package com.rateapp;
14
+
15
+ import com.facebook.proguard.annotations.DoNotStrip;
16
+ import com.facebook.react.bridge.Promise;
17
+ import com.facebook.react.bridge.ReactApplicationContext;
18
+ import com.facebook.react.bridge.ReactContextBaseJavaModule;
19
+ import com.facebook.react.bridge.ReactMethod;
20
+ import com.facebook.react.turbomodule.core.interfaces.TurboModule;
21
+ import javax.annotation.Nonnull;
22
+
23
+ public abstract class NativeRateAppSpec extends ReactContextBaseJavaModule implements TurboModule {
24
+ public static final String NAME = "RateApp";
25
+
26
+ public NativeRateAppSpec(ReactApplicationContext reactContext) {
27
+ super(reactContext);
28
+ }
29
+
30
+ @Override
31
+ public @Nonnull String getName() {
32
+ return NAME;
33
+ }
34
+
35
+ @ReactMethod
36
+ @DoNotStrip
37
+ public abstract void requestReview(Promise promise);
38
+
39
+ @ReactMethod
40
+ @DoNotStrip
41
+ public abstract void requestReviewAppGallery(Promise promise);
42
+
43
+ @ReactMethod
44
+ @DoNotStrip
45
+ public abstract void requestReviewGalaxyStore(String androidPackageName, Promise promise);
46
+ }
@@ -0,0 +1,28 @@
1
+ # Copyright (c) Meta Platforms, Inc. and affiliates.
2
+ #
3
+ # This source code is licensed under the MIT license found in the
4
+ # LICENSE file in the root directory of this source tree.
5
+
6
+ cmake_minimum_required(VERSION 3.13)
7
+ set(CMAKE_VERBOSE_MAKEFILE on)
8
+
9
+ file(GLOB react_codegen_SRCS CONFIGURE_DEPENDS *.cpp react/renderer/components/RateAppSpec/*.cpp)
10
+
11
+ add_library(
12
+ react_codegen_RateAppSpec
13
+ OBJECT
14
+ ${react_codegen_SRCS}
15
+ )
16
+
17
+ target_include_directories(react_codegen_RateAppSpec PUBLIC . react/renderer/components/RateAppSpec)
18
+
19
+ target_link_libraries(
20
+ react_codegen_RateAppSpec
21
+ fbjni
22
+ jsi
23
+ # We need to link different libraries based on whether we are building rncore or not, that's necessary
24
+ # because we want to break a circular dependency between react_codegen_rncore and reactnative
25
+ reactnative
26
+ )
27
+
28
+ target_compile_reactnative_options(react_codegen_RateAppSpec PRIVATE)
@@ -0,0 +1,44 @@
1
+
2
+ /**
3
+ * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
4
+ *
5
+ * Do not edit this file as changes may cause incorrect behavior and will be lost
6
+ * once the code is regenerated.
7
+ *
8
+ * @generated by codegen project: GenerateModuleJniCpp.js
9
+ */
10
+
11
+ #include "RateAppSpec.h"
12
+
13
+ namespace facebook::react {
14
+
15
+ static facebook::jsi::Value __hostFunction_NativeRateAppSpecJSI_requestReview(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
16
+ static jmethodID cachedMethodId = nullptr;
17
+ return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, PromiseKind, "requestReview", "(Lcom/facebook/react/bridge/Promise;)V", args, count, cachedMethodId);
18
+ }
19
+
20
+ static facebook::jsi::Value __hostFunction_NativeRateAppSpecJSI_requestReviewAppGallery(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
21
+ static jmethodID cachedMethodId = nullptr;
22
+ return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, PromiseKind, "requestReviewAppGallery", "(Lcom/facebook/react/bridge/Promise;)V", args, count, cachedMethodId);
23
+ }
24
+
25
+ static facebook::jsi::Value __hostFunction_NativeRateAppSpecJSI_requestReviewGalaxyStore(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
26
+ static jmethodID cachedMethodId = nullptr;
27
+ return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, PromiseKind, "requestReviewGalaxyStore", "(Ljava/lang/String;Lcom/facebook/react/bridge/Promise;)V", args, count, cachedMethodId);
28
+ }
29
+
30
+ NativeRateAppSpecJSI::NativeRateAppSpecJSI(const JavaTurboModule::InitParams &params)
31
+ : JavaTurboModule(params) {
32
+ methodMap_["requestReview"] = MethodMetadata {0, __hostFunction_NativeRateAppSpecJSI_requestReview};
33
+ methodMap_["requestReviewAppGallery"] = MethodMetadata {0, __hostFunction_NativeRateAppSpecJSI_requestReviewAppGallery};
34
+ methodMap_["requestReviewGalaxyStore"] = MethodMetadata {1, __hostFunction_NativeRateAppSpecJSI_requestReviewGalaxyStore};
35
+ }
36
+
37
+ std::shared_ptr<TurboModule> RateAppSpec_ModuleProvider(const std::string &moduleName, const JavaTurboModule::InitParams &params) {
38
+ if (moduleName == "RateApp") {
39
+ return std::make_shared<NativeRateAppSpecJSI>(params);
40
+ }
41
+ return nullptr;
42
+ }
43
+
44
+ } // namespace facebook::react
@@ -0,0 +1,31 @@
1
+
2
+ /**
3
+ * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
4
+ *
5
+ * Do not edit this file as changes may cause incorrect behavior and will be lost
6
+ * once the code is regenerated.
7
+ *
8
+ * @generated by codegen project: GenerateModuleJniH.js
9
+ */
10
+
11
+ #pragma once
12
+
13
+ #include <ReactCommon/JavaTurboModule.h>
14
+ #include <ReactCommon/TurboModule.h>
15
+ #include <jsi/jsi.h>
16
+
17
+ namespace facebook::react {
18
+
19
+ /**
20
+ * JNI C++ class for module 'NativeRateApp'
21
+ */
22
+ class JSI_EXPORT NativeRateAppSpecJSI : public JavaTurboModule {
23
+ public:
24
+ NativeRateAppSpecJSI(const JavaTurboModule::InitParams &params);
25
+ };
26
+
27
+
28
+ JSI_EXPORT
29
+ std::shared_ptr<TurboModule> RateAppSpec_ModuleProvider(const std::string &moduleName, const JavaTurboModule::InitParams &params);
30
+
31
+ } // namespace facebook::react
@@ -0,0 +1,54 @@
1
+ /**
2
+ * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
3
+ *
4
+ * Do not edit this file as changes may cause incorrect behavior and will be lost
5
+ * once the code is regenerated.
6
+ *
7
+ * @generated by codegen project: GenerateModuleH.js
8
+ */
9
+
10
+ #pragma once
11
+
12
+ #include <ReactCommon/TurboModule.h>
13
+ #include <react/bridging/Bridging.h>
14
+
15
+ namespace facebook::react {
16
+
17
+
18
+ template <typename T>
19
+ class JSI_EXPORT NativeRateAppCxxSpec : public TurboModule {
20
+ public:
21
+ static constexpr std::string_view kModuleName = "RateApp";
22
+
23
+ protected:
24
+ NativeRateAppCxxSpec(std::shared_ptr<CallInvoker> jsInvoker) : TurboModule(std::string{NativeRateAppCxxSpec::kModuleName}, jsInvoker) {
25
+ methodMap_["requestReview"] = MethodMetadata {.argCount = 0, .invoker = __requestReview};
26
+ methodMap_["requestReviewAppGallery"] = MethodMetadata {.argCount = 0, .invoker = __requestReviewAppGallery};
27
+ methodMap_["requestReviewGalaxyStore"] = MethodMetadata {.argCount = 1, .invoker = __requestReviewGalaxyStore};
28
+ }
29
+
30
+ private:
31
+ static jsi::Value __requestReview(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* /*args*/, size_t /*count*/) {
32
+ static_assert(
33
+ bridging::getParameterCount(&T::requestReview) == 1,
34
+ "Expected requestReview(...) to have 1 parameters");
35
+ return bridging::callFromJs<jsi::Value>(rt, &T::requestReview, static_cast<NativeRateAppCxxSpec*>(&turboModule)->jsInvoker_, static_cast<T*>(&turboModule));
36
+ }
37
+
38
+ static jsi::Value __requestReviewAppGallery(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* /*args*/, size_t /*count*/) {
39
+ static_assert(
40
+ bridging::getParameterCount(&T::requestReviewAppGallery) == 1,
41
+ "Expected requestReviewAppGallery(...) to have 1 parameters");
42
+ return bridging::callFromJs<jsi::Value>(rt, &T::requestReviewAppGallery, static_cast<NativeRateAppCxxSpec*>(&turboModule)->jsInvoker_, static_cast<T*>(&turboModule));
43
+ }
44
+
45
+ static jsi::Value __requestReviewGalaxyStore(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
46
+ static_assert(
47
+ bridging::getParameterCount(&T::requestReviewGalaxyStore) == 2,
48
+ "Expected requestReviewGalaxyStore(...) to have 2 parameters");
49
+ return bridging::callFromJs<jsi::Value>(rt, &T::requestReviewGalaxyStore, static_cast<NativeRateAppCxxSpec*>(&turboModule)->jsInvoker_, static_cast<T*>(&turboModule),
50
+ count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt));
51
+ }
52
+ };
53
+
54
+ } // namespace facebook::react
@@ -0,0 +1,53 @@
1
+ /**
2
+ * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
3
+ *
4
+ * Do not edit this file as changes may cause incorrect behavior and will be lost
5
+ * once the code is regenerated.
6
+ *
7
+ * @generated by codegen project: GenerateModuleObjCpp
8
+ *
9
+ * We create an umbrella header (and corresponding implementation) here since
10
+ * Cxx compilation in BUCK has a limitation: source-code producing genrule()s
11
+ * must have a single output. More files => more genrule()s => slower builds.
12
+ */
13
+
14
+ #import "RateAppSpec.h"
15
+
16
+
17
+ @implementation NativeRateAppSpecBase
18
+
19
+
20
+ - (void)setEventEmitterCallback:(EventEmitterCallbackWrapper *)eventEmitterCallbackWrapper
21
+ {
22
+ _eventEmitterCallback = std::move(eventEmitterCallbackWrapper->_eventEmitterCallback);
23
+ }
24
+ @end
25
+
26
+
27
+ namespace facebook::react {
28
+
29
+ static facebook::jsi::Value __hostFunction_NativeRateAppSpecJSI_requestReview(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
30
+ return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "requestReview", @selector(requestReview:reject:), args, count);
31
+ }
32
+
33
+ static facebook::jsi::Value __hostFunction_NativeRateAppSpecJSI_requestReviewAppGallery(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
34
+ return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "requestReviewAppGallery", @selector(requestReviewAppGallery:reject:), args, count);
35
+ }
36
+
37
+ static facebook::jsi::Value __hostFunction_NativeRateAppSpecJSI_requestReviewGalaxyStore(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
38
+ return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "requestReviewGalaxyStore", @selector(requestReviewGalaxyStore:resolve:reject:), args, count);
39
+ }
40
+
41
+ NativeRateAppSpecJSI::NativeRateAppSpecJSI(const ObjCTurboModule::InitParams &params)
42
+ : ObjCTurboModule(params) {
43
+
44
+ methodMap_["requestReview"] = MethodMetadata {0, __hostFunction_NativeRateAppSpecJSI_requestReview};
45
+
46
+
47
+ methodMap_["requestReviewAppGallery"] = MethodMetadata {0, __hostFunction_NativeRateAppSpecJSI_requestReviewAppGallery};
48
+
49
+
50
+ methodMap_["requestReviewGalaxyStore"] = MethodMetadata {1, __hostFunction_NativeRateAppSpecJSI_requestReviewGalaxyStore};
51
+
52
+ }
53
+ } // namespace facebook::react
@@ -0,0 +1,68 @@
1
+ /**
2
+ * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
3
+ *
4
+ * Do not edit this file as changes may cause incorrect behavior and will be lost
5
+ * once the code is regenerated.
6
+ *
7
+ * @generated by codegen project: GenerateModuleObjCpp
8
+ *
9
+ * We create an umbrella header (and corresponding implementation) here since
10
+ * Cxx compilation in BUCK has a limitation: source-code producing genrule()s
11
+ * must have a single output. More files => more genrule()s => slower builds.
12
+ */
13
+
14
+ #ifndef __cplusplus
15
+ #error This file must be compiled as Obj-C++. If you are importing it, you must change your file extension to .mm.
16
+ #endif
17
+
18
+ // Avoid multiple includes of RateAppSpec symbols
19
+ #ifndef RateAppSpec_H
20
+ #define RateAppSpec_H
21
+
22
+ #import <Foundation/Foundation.h>
23
+ #import <RCTRequired/RCTRequired.h>
24
+ #import <RCTTypeSafety/RCTConvertHelpers.h>
25
+ #import <RCTTypeSafety/RCTTypedModuleConstants.h>
26
+ #import <React/RCTBridgeModule.h>
27
+ #import <React/RCTCxxConvert.h>
28
+ #import <React/RCTManagedPointer.h>
29
+ #import <ReactCommon/RCTTurboModule.h>
30
+ #import <optional>
31
+ #import <vector>
32
+
33
+
34
+ NS_ASSUME_NONNULL_BEGIN
35
+
36
+ @protocol NativeRateAppSpec <RCTBridgeModule, RCTTurboModule>
37
+
38
+ - (void)requestReview:(RCTPromiseResolveBlock)resolve
39
+ reject:(RCTPromiseRejectBlock)reject;
40
+ - (void)requestReviewAppGallery:(RCTPromiseResolveBlock)resolve
41
+ reject:(RCTPromiseRejectBlock)reject;
42
+ - (void)requestReviewGalaxyStore:(NSString *)androidPackageName
43
+ resolve:(RCTPromiseResolveBlock)resolve
44
+ reject:(RCTPromiseRejectBlock)reject;
45
+
46
+ @end
47
+
48
+ @interface NativeRateAppSpecBase : NSObject {
49
+ @protected
50
+ facebook::react::EventEmitterCallback _eventEmitterCallback;
51
+ }
52
+ - (void)setEventEmitterCallback:(EventEmitterCallbackWrapper *)eventEmitterCallbackWrapper;
53
+
54
+
55
+ @end
56
+
57
+ namespace facebook::react {
58
+ /**
59
+ * ObjC++ class for module 'NativeRateApp'
60
+ */
61
+ class JSI_EXPORT NativeRateAppSpecJSI : public ObjCTurboModule {
62
+ public:
63
+ NativeRateAppSpecJSI(const ObjCTurboModule::InitParams &params);
64
+ };
65
+ } // namespace facebook::react
66
+
67
+ NS_ASSUME_NONNULL_END
68
+ #endif // RateAppSpec_H
@@ -0,0 +1,54 @@
1
+ /**
2
+ * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
3
+ *
4
+ * Do not edit this file as changes may cause incorrect behavior and will be lost
5
+ * once the code is regenerated.
6
+ *
7
+ * @generated by codegen project: GenerateModuleH.js
8
+ */
9
+
10
+ #pragma once
11
+
12
+ #include <ReactCommon/TurboModule.h>
13
+ #include <react/bridging/Bridging.h>
14
+
15
+ namespace facebook::react {
16
+
17
+
18
+ template <typename T>
19
+ class JSI_EXPORT NativeRateAppCxxSpec : public TurboModule {
20
+ public:
21
+ static constexpr std::string_view kModuleName = "RateApp";
22
+
23
+ protected:
24
+ NativeRateAppCxxSpec(std::shared_ptr<CallInvoker> jsInvoker) : TurboModule(std::string{NativeRateAppCxxSpec::kModuleName}, jsInvoker) {
25
+ methodMap_["requestReview"] = MethodMetadata {.argCount = 0, .invoker = __requestReview};
26
+ methodMap_["requestReviewAppGallery"] = MethodMetadata {.argCount = 0, .invoker = __requestReviewAppGallery};
27
+ methodMap_["requestReviewGalaxyStore"] = MethodMetadata {.argCount = 1, .invoker = __requestReviewGalaxyStore};
28
+ }
29
+
30
+ private:
31
+ static jsi::Value __requestReview(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* /*args*/, size_t /*count*/) {
32
+ static_assert(
33
+ bridging::getParameterCount(&T::requestReview) == 1,
34
+ "Expected requestReview(...) to have 1 parameters");
35
+ return bridging::callFromJs<jsi::Value>(rt, &T::requestReview, static_cast<NativeRateAppCxxSpec*>(&turboModule)->jsInvoker_, static_cast<T*>(&turboModule));
36
+ }
37
+
38
+ static jsi::Value __requestReviewAppGallery(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* /*args*/, size_t /*count*/) {
39
+ static_assert(
40
+ bridging::getParameterCount(&T::requestReviewAppGallery) == 1,
41
+ "Expected requestReviewAppGallery(...) to have 1 parameters");
42
+ return bridging::callFromJs<jsi::Value>(rt, &T::requestReviewAppGallery, static_cast<NativeRateAppCxxSpec*>(&turboModule)->jsInvoker_, static_cast<T*>(&turboModule));
43
+ }
44
+
45
+ static jsi::Value __requestReviewGalaxyStore(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
46
+ static_assert(
47
+ bridging::getParameterCount(&T::requestReviewGalaxyStore) == 2,
48
+ "Expected requestReviewGalaxyStore(...) to have 2 parameters");
49
+ return bridging::callFromJs<jsi::Value>(rt, &T::requestReviewGalaxyStore, static_cast<NativeRateAppCxxSpec*>(&turboModule)->jsInvoker_, static_cast<T*>(&turboModule),
50
+ count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt));
51
+ }
52
+ };
53
+
54
+ } // namespace facebook::react
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-rate-app",
3
- "version": "1.4.10",
3
+ "version": "1.4.12",
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",
@@ -66,18 +66,18 @@
66
66
  "@biomejs/biome": "2.4.5",
67
67
  "@commitlint/cli": "20.4.3",
68
68
  "@commitlint/config-conventional": "20.4.3",
69
- "@react-native-community/cli": "18.0.0",
69
+ "@react-native-community/cli": "20.1.2",
70
70
  "@semantic-release/changelog": "6.0.3",
71
71
  "@semantic-release/git": "10.0.1",
72
72
  "@types/jest": "30.0.0",
73
- "@types/react": "19.0.10",
73
+ "@types/react": "19.2.14",
74
74
  "commitlint": "20.4.3",
75
75
  "del-cli": "7.0.0",
76
76
  "expo": "55.0.4",
77
77
  "husky": "9.1.7",
78
78
  "jest": "30.2.0",
79
79
  "prettier": "3.8.1",
80
- "react": "19.0.0",
80
+ "react": "19.2.4",
81
81
  "react-native": "0.84.1",
82
82
  "react-native-builder-bob": "0.40.18",
83
83
  "semantic-release": "25.0.3",
@@ -85,7 +85,7 @@
85
85
  "typescript": "5.9.3"
86
86
  },
87
87
  "resolutions": {
88
- "@types/react": "19.0.10"
88
+ "@types/react": "19.2.14"
89
89
  },
90
90
  "peerDependencies": {
91
91
  "react": "*",
@@ -128,7 +128,8 @@
128
128
  "targets": [
129
129
  "commonjs",
130
130
  "module",
131
- "typescript"
131
+ "typescript",
132
+ "codegen"
132
133
  ]
133
134
  },
134
135
  "codegenConfig": {
@@ -137,7 +138,12 @@
137
138
  "jsSrcsDir": "./src/codegenSpec",
138
139
  "android": {
139
140
  "javaPackageName": "com.rateapp"
140
- }
141
+ },
142
+ "outputDir": {
143
+ "ios": "ios/generated",
144
+ "android": "android/generated"
145
+ },
146
+ "includesGeneratedCode": true
141
147
  },
142
148
  "create-react-native-library": {
143
149
  "type": "turbo-module",