react-native-rate-app 1.3.9 → 1.4.0

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.
@@ -15,7 +15,6 @@ buildscript {
15
15
  }
16
16
  }
17
17
 
18
-
19
18
  def isNewArchitectureEnabled() {
20
19
  return rootProject.hasProperty("newArchEnabled") && rootProject.getProperty("newArchEnabled") == "true"
21
20
  }
@@ -31,26 +30,7 @@ def getExtOrIntegerDefault(name) {
31
30
  return rootProject.ext.has(name) ? rootProject.ext.get(name) : (project.properties["RateApp_" + name]).toInteger()
32
31
  }
33
32
 
34
- def supportsNamespace() {
35
- def parsed = com.android.Version.ANDROID_GRADLE_PLUGIN_VERSION.tokenize('.')
36
- def major = parsed[0].toInteger()
37
- def minor = parsed[1].toInteger()
38
-
39
- // Namespace support was added in 7.3.0
40
- return (major == 7 && minor >= 3) || major >= 8
41
- }
42
-
43
33
  android {
44
- if (supportsNamespace()) {
45
- namespace "com.rateapp"
46
-
47
- sourceSets {
48
- main {
49
- manifest.srcFile "src/main/AndroidManifestNew.xml"
50
- }
51
- }
52
- }
53
-
54
34
  compileSdkVersion getExtOrIntegerDefault("compileSdkVersion")
55
35
 
56
36
  defaultConfig {
@@ -104,12 +84,4 @@ dependencies {
104
84
  implementation "com.facebook.react:react-android"
105
85
  implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
106
86
  implementation "com.google.android.play:review:2.0.1"
107
- }
108
-
109
- if (isNewArchitectureEnabled()) {
110
- react {
111
- jsRootDir = file("../src/")
112
- libraryName = "RateApp"
113
- codegenJavaPackageName = "com.rateapp"
114
- }
115
- }
87
+ }
package/ios/RateApp.h CHANGED
@@ -1,5 +1,5 @@
1
1
  #ifdef RCT_NEW_ARCH_ENABLED
2
- #import "generated/RateAppSpec/RateAppSpec.h"
2
+ #import "RateAppSpec/RateAppSpec.h"
3
3
 
4
4
  @interface RateApp : NSObject <NativeRateAppSpec>
5
5
  #else
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-rate-app",
3
- "version": "1.3.9",
3
+ "version": "1.4.0",
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",
@@ -14,7 +14,6 @@
14
14
  "ios",
15
15
  "cpp",
16
16
  "*.podspec",
17
- "react-native.config.js",
18
17
  "!ios/build",
19
18
  "!android/build",
20
19
  "!android/gradle",
@@ -64,7 +63,7 @@
64
63
  "registry": "https://registry.npmjs.org/"
65
64
  },
66
65
  "devDependencies": {
67
- "@biomejs/biome": "2.1.2",
66
+ "@biomejs/biome": "2.2.2",
68
67
  "@commitlint/cli": "19.8.1",
69
68
  "@commitlint/config-conventional": "19.8.1",
70
69
  "@react-native-community/cli": "18.0.0",
@@ -74,15 +73,15 @@
74
73
  "@types/react": "19.0.10",
75
74
  "commitlint": "19.8.1",
76
75
  "del-cli": "6.0.0",
77
- "expo": "53.0.17",
76
+ "expo": "53.0.20",
78
77
  "husky": "9.1.7",
79
78
  "jest": "30.0.5",
80
79
  "react": "19.0.0",
81
- "react-native": "0.80.2",
80
+ "react-native": "0.81.0",
82
81
  "react-native-builder-bob": "0.40.13",
83
82
  "semantic-release": "24.2.7",
84
- "turbo": "2.5.5",
85
- "typescript": "5.8.3"
83
+ "turbo": "2.5.6",
84
+ "typescript": "5.9.2"
86
85
  },
87
86
  "resolutions": {
88
87
  "@types/react": "19.0.10"
@@ -99,7 +98,7 @@
99
98
  "workspaces": [
100
99
  "example"
101
100
  ],
102
- "packageManager": "yarn@4.9.2",
101
+ "packageManager": "yarn@4.9.3",
103
102
  "jest": {
104
103
  "preset": "react-native",
105
104
  "modulePathIgnorePatterns": [
@@ -126,7 +125,6 @@
126
125
  "source": "src",
127
126
  "output": "lib",
128
127
  "targets": [
129
- "codegen",
130
128
  "commonjs",
131
129
  "module",
132
130
  "typescript"
@@ -136,18 +134,13 @@
136
134
  "name": "RateAppSpec",
137
135
  "type": "modules",
138
136
  "jsSrcsDir": "./src/codegenSpec",
139
- "outputDir": {
140
- "ios": "ios/generated",
141
- "android": "android/generated"
142
- },
143
137
  "android": {
144
138
  "javaPackageName": "com.rateapp"
145
- },
146
- "includesGeneratedCode": true
139
+ }
147
140
  },
148
141
  "create-react-native-library": {
149
142
  "type": "turbo-module",
150
143
  "languages": "kotlin-objc",
151
- "version": "0.50.3"
144
+ "version": "0.52.1"
152
145
  }
153
146
  }
@@ -1,46 +0,0 @@
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
- }
@@ -1,36 +0,0 @@
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_options(
29
- react_codegen_RateAppSpec
30
- PRIVATE
31
- -DLOG_TAG=\"ReactNative\"
32
- -fexceptions
33
- -frtti
34
- -std=c++20
35
- -Wall
36
- )
@@ -1,44 +0,0 @@
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
@@ -1,31 +0,0 @@
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
@@ -1,39 +0,0 @@
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: GenerateModuleCpp.js
8
- */
9
-
10
- #include "RateAppSpecJSI.h"
11
-
12
- namespace facebook::react {
13
-
14
- static jsi::Value __hostFunction_NativeRateAppCxxSpecJSI_requestReview(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
15
- return static_cast<NativeRateAppCxxSpecJSI *>(&turboModule)->requestReview(
16
- rt
17
- );
18
- }
19
- static jsi::Value __hostFunction_NativeRateAppCxxSpecJSI_requestReviewAppGallery(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
20
- return static_cast<NativeRateAppCxxSpecJSI *>(&turboModule)->requestReviewAppGallery(
21
- rt
22
- );
23
- }
24
- static jsi::Value __hostFunction_NativeRateAppCxxSpecJSI_requestReviewGalaxyStore(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
25
- return static_cast<NativeRateAppCxxSpecJSI *>(&turboModule)->requestReviewGalaxyStore(
26
- rt,
27
- count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt)
28
- );
29
- }
30
-
31
- NativeRateAppCxxSpecJSI::NativeRateAppCxxSpecJSI(std::shared_ptr<CallInvoker> jsInvoker)
32
- : TurboModule("RateApp", jsInvoker) {
33
- methodMap_["requestReview"] = MethodMetadata {0, __hostFunction_NativeRateAppCxxSpecJSI_requestReview};
34
- methodMap_["requestReviewAppGallery"] = MethodMetadata {0, __hostFunction_NativeRateAppCxxSpecJSI_requestReviewAppGallery};
35
- methodMap_["requestReviewGalaxyStore"] = MethodMetadata {1, __hostFunction_NativeRateAppCxxSpecJSI_requestReviewGalaxyStore};
36
- }
37
-
38
-
39
- } // namespace facebook::react
@@ -1,89 +0,0 @@
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
- class JSI_EXPORT NativeRateAppCxxSpecJSI : public TurboModule {
19
- protected:
20
- NativeRateAppCxxSpecJSI(std::shared_ptr<CallInvoker> jsInvoker);
21
-
22
- public:
23
- virtual jsi::Value requestReview(jsi::Runtime &rt) = 0;
24
- virtual jsi::Value requestReviewAppGallery(jsi::Runtime &rt) = 0;
25
- virtual jsi::Value requestReviewGalaxyStore(jsi::Runtime &rt, jsi::String androidPackageName) = 0;
26
-
27
- };
28
-
29
- template <typename T>
30
- class JSI_EXPORT NativeRateAppCxxSpec : public TurboModule {
31
- public:
32
- jsi::Value create(jsi::Runtime &rt, const jsi::PropNameID &propName) override {
33
- return delegate_.create(rt, propName);
34
- }
35
-
36
- std::vector<jsi::PropNameID> getPropertyNames(jsi::Runtime& runtime) override {
37
- return delegate_.getPropertyNames(runtime);
38
- }
39
-
40
- static constexpr std::string_view kModuleName = "RateApp";
41
-
42
- protected:
43
- NativeRateAppCxxSpec(std::shared_ptr<CallInvoker> jsInvoker)
44
- : TurboModule(std::string{NativeRateAppCxxSpec::kModuleName}, jsInvoker),
45
- delegate_(reinterpret_cast<T*>(this), jsInvoker) {}
46
-
47
-
48
- private:
49
- class Delegate : public NativeRateAppCxxSpecJSI {
50
- public:
51
- Delegate(T *instance, std::shared_ptr<CallInvoker> jsInvoker) :
52
- NativeRateAppCxxSpecJSI(std::move(jsInvoker)), instance_(instance) {
53
-
54
- }
55
-
56
- jsi::Value requestReview(jsi::Runtime &rt) override {
57
- static_assert(
58
- bridging::getParameterCount(&T::requestReview) == 1,
59
- "Expected requestReview(...) to have 1 parameters");
60
-
61
- return bridging::callFromJs<jsi::Value>(
62
- rt, &T::requestReview, jsInvoker_, instance_);
63
- }
64
- jsi::Value requestReviewAppGallery(jsi::Runtime &rt) override {
65
- static_assert(
66
- bridging::getParameterCount(&T::requestReviewAppGallery) == 1,
67
- "Expected requestReviewAppGallery(...) to have 1 parameters");
68
-
69
- return bridging::callFromJs<jsi::Value>(
70
- rt, &T::requestReviewAppGallery, jsInvoker_, instance_);
71
- }
72
- jsi::Value requestReviewGalaxyStore(jsi::Runtime &rt, jsi::String androidPackageName) override {
73
- static_assert(
74
- bridging::getParameterCount(&T::requestReviewGalaxyStore) == 2,
75
- "Expected requestReviewGalaxyStore(...) to have 2 parameters");
76
-
77
- return bridging::callFromJs<jsi::Value>(
78
- rt, &T::requestReviewGalaxyStore, jsInvoker_, instance_, std::move(androidPackageName));
79
- }
80
-
81
- private:
82
- friend class NativeRateAppCxxSpec;
83
- T *instance_;
84
- };
85
-
86
- Delegate delegate_;
87
- };
88
-
89
- } // namespace facebook::react
@@ -1,53 +0,0 @@
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
@@ -1,68 +0,0 @@
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
@@ -1,39 +0,0 @@
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: GenerateModuleCpp.js
8
- */
9
-
10
- #include "RateAppSpecJSI.h"
11
-
12
- namespace facebook::react {
13
-
14
- static jsi::Value __hostFunction_NativeRateAppCxxSpecJSI_requestReview(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
15
- return static_cast<NativeRateAppCxxSpecJSI *>(&turboModule)->requestReview(
16
- rt
17
- );
18
- }
19
- static jsi::Value __hostFunction_NativeRateAppCxxSpecJSI_requestReviewAppGallery(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
20
- return static_cast<NativeRateAppCxxSpecJSI *>(&turboModule)->requestReviewAppGallery(
21
- rt
22
- );
23
- }
24
- static jsi::Value __hostFunction_NativeRateAppCxxSpecJSI_requestReviewGalaxyStore(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
25
- return static_cast<NativeRateAppCxxSpecJSI *>(&turboModule)->requestReviewGalaxyStore(
26
- rt,
27
- count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt)
28
- );
29
- }
30
-
31
- NativeRateAppCxxSpecJSI::NativeRateAppCxxSpecJSI(std::shared_ptr<CallInvoker> jsInvoker)
32
- : TurboModule("RateApp", jsInvoker) {
33
- methodMap_["requestReview"] = MethodMetadata {0, __hostFunction_NativeRateAppCxxSpecJSI_requestReview};
34
- methodMap_["requestReviewAppGallery"] = MethodMetadata {0, __hostFunction_NativeRateAppCxxSpecJSI_requestReviewAppGallery};
35
- methodMap_["requestReviewGalaxyStore"] = MethodMetadata {1, __hostFunction_NativeRateAppCxxSpecJSI_requestReviewGalaxyStore};
36
- }
37
-
38
-
39
- } // namespace facebook::react
@@ -1,89 +0,0 @@
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
- class JSI_EXPORT NativeRateAppCxxSpecJSI : public TurboModule {
19
- protected:
20
- NativeRateAppCxxSpecJSI(std::shared_ptr<CallInvoker> jsInvoker);
21
-
22
- public:
23
- virtual jsi::Value requestReview(jsi::Runtime &rt) = 0;
24
- virtual jsi::Value requestReviewAppGallery(jsi::Runtime &rt) = 0;
25
- virtual jsi::Value requestReviewGalaxyStore(jsi::Runtime &rt, jsi::String androidPackageName) = 0;
26
-
27
- };
28
-
29
- template <typename T>
30
- class JSI_EXPORT NativeRateAppCxxSpec : public TurboModule {
31
- public:
32
- jsi::Value create(jsi::Runtime &rt, const jsi::PropNameID &propName) override {
33
- return delegate_.create(rt, propName);
34
- }
35
-
36
- std::vector<jsi::PropNameID> getPropertyNames(jsi::Runtime& runtime) override {
37
- return delegate_.getPropertyNames(runtime);
38
- }
39
-
40
- static constexpr std::string_view kModuleName = "RateApp";
41
-
42
- protected:
43
- NativeRateAppCxxSpec(std::shared_ptr<CallInvoker> jsInvoker)
44
- : TurboModule(std::string{NativeRateAppCxxSpec::kModuleName}, jsInvoker),
45
- delegate_(reinterpret_cast<T*>(this), jsInvoker) {}
46
-
47
-
48
- private:
49
- class Delegate : public NativeRateAppCxxSpecJSI {
50
- public:
51
- Delegate(T *instance, std::shared_ptr<CallInvoker> jsInvoker) :
52
- NativeRateAppCxxSpecJSI(std::move(jsInvoker)), instance_(instance) {
53
-
54
- }
55
-
56
- jsi::Value requestReview(jsi::Runtime &rt) override {
57
- static_assert(
58
- bridging::getParameterCount(&T::requestReview) == 1,
59
- "Expected requestReview(...) to have 1 parameters");
60
-
61
- return bridging::callFromJs<jsi::Value>(
62
- rt, &T::requestReview, jsInvoker_, instance_);
63
- }
64
- jsi::Value requestReviewAppGallery(jsi::Runtime &rt) override {
65
- static_assert(
66
- bridging::getParameterCount(&T::requestReviewAppGallery) == 1,
67
- "Expected requestReviewAppGallery(...) to have 1 parameters");
68
-
69
- return bridging::callFromJs<jsi::Value>(
70
- rt, &T::requestReviewAppGallery, jsInvoker_, instance_);
71
- }
72
- jsi::Value requestReviewGalaxyStore(jsi::Runtime &rt, jsi::String androidPackageName) override {
73
- static_assert(
74
- bridging::getParameterCount(&T::requestReviewGalaxyStore) == 2,
75
- "Expected requestReviewGalaxyStore(...) to have 2 parameters");
76
-
77
- return bridging::callFromJs<jsi::Value>(
78
- rt, &T::requestReviewGalaxyStore, jsInvoker_, instance_, std::move(androidPackageName));
79
- }
80
-
81
- private:
82
- friend class NativeRateAppCxxSpec;
83
- T *instance_;
84
- };
85
-
86
- Delegate delegate_;
87
- };
88
-
89
- } // namespace facebook::react
@@ -1,12 +0,0 @@
1
- /**
2
- * @type {import('@react-native-community/cli-types').UserDependencyConfig}
3
- */
4
- module.exports = {
5
- dependency: {
6
- platforms: {
7
- android: {
8
- cmakeListsPath: 'generated/jni/CMakeLists.txt',
9
- },
10
- },
11
- },
12
- };