@rejourneyco/react-native 1.0.10 → 1.0.11
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/ios/Rejourney.h +4 -0
- package/ios/Rejourney.mm +3 -15
- package/package.json +1 -1
- package/rejourney.podspec +11 -2
package/ios/Rejourney.h
CHANGED
|
@@ -24,10 +24,14 @@
|
|
|
24
24
|
#import <ReactCommon/RCTTurboModule.h>
|
|
25
25
|
#if __has_include(<RejourneySpec/RejourneySpec.h>)
|
|
26
26
|
#import <RejourneySpec/RejourneySpec.h>
|
|
27
|
+
#define RJ_USE_NEW_ARCH_CODEGEN 1
|
|
27
28
|
#elif __has_include("RejourneySpec.h")
|
|
28
29
|
#import "RejourneySpec.h"
|
|
30
|
+
#define RJ_USE_NEW_ARCH_CODEGEN 1
|
|
31
|
+
#endif
|
|
29
32
|
#endif
|
|
30
33
|
|
|
34
|
+
#if defined(RCT_NEW_ARCH_ENABLED) && defined(RJ_USE_NEW_ARCH_CODEGEN)
|
|
31
35
|
@interface Rejourney : NSObject <NativeRejourneySpec>
|
|
32
36
|
#else
|
|
33
37
|
@interface Rejourney : NSObject <RCTBridgeModule>
|
package/ios/Rejourney.mm
CHANGED
|
@@ -33,8 +33,10 @@
|
|
|
33
33
|
#import <ReactCommon/RCTTurboModule.h>
|
|
34
34
|
#if __has_include(<RejourneySpec/RejourneySpec.h>)
|
|
35
35
|
#import <RejourneySpec/RejourneySpec.h>
|
|
36
|
+
#define RJ_USE_NEW_ARCH_CODEGEN 1
|
|
36
37
|
#elif __has_include("RejourneySpec.h")
|
|
37
38
|
#import "RejourneySpec.h"
|
|
39
|
+
#define RJ_USE_NEW_ARCH_CODEGEN 1
|
|
38
40
|
#endif
|
|
39
41
|
#endif
|
|
40
42
|
|
|
@@ -110,7 +112,7 @@ RCT_EXPORT_METHOD(removeListeners : (double)count) {
|
|
|
110
112
|
return _impl;
|
|
111
113
|
}
|
|
112
114
|
|
|
113
|
-
#
|
|
115
|
+
#if defined(RCT_NEW_ARCH_ENABLED) && defined(RJ_USE_NEW_ARCH_CODEGEN)
|
|
114
116
|
- (std::shared_ptr<facebook::react::TurboModule>)getTurboModule:
|
|
115
117
|
(const facebook::react::ObjCTurboModule::InitParams &)params {
|
|
116
118
|
return std::make_shared<facebook::react::NativeRejourneySpecJSI>(params);
|
|
@@ -139,20 +141,6 @@ RCT_EXPORT_METHOD(startSession : (NSString *)userId apiUrl : (NSString *)
|
|
|
139
141
|
reject:reject];
|
|
140
142
|
}
|
|
141
143
|
|
|
142
|
-
RCT_EXPORT_METHOD(startSessionWithOptions : (NSDictionary *)options resolve : (
|
|
143
|
-
RCTPromiseResolveBlock)resolve reject : (RCTPromiseRejectBlock)reject) {
|
|
144
|
-
RejourneyImpl *impl = [self ensureImpl];
|
|
145
|
-
if (!impl) {
|
|
146
|
-
resolve(@{
|
|
147
|
-
@"success" : @NO,
|
|
148
|
-
@"sessionId" : @"",
|
|
149
|
-
@"error" : @"Native module not available"
|
|
150
|
-
});
|
|
151
|
-
return;
|
|
152
|
-
}
|
|
153
|
-
[impl startSessionWithOptions:options resolve:resolve reject:reject];
|
|
154
|
-
}
|
|
155
|
-
|
|
156
144
|
RCT_EXPORT_METHOD(stopSession : (RCTPromiseResolveBlock)
|
|
157
145
|
resolve reject : (RCTPromiseRejectBlock)reject) {
|
|
158
146
|
RejourneyImpl *impl = [self ensureImpl];
|
package/package.json
CHANGED
package/rejourney.podspec
CHANGED
|
@@ -18,6 +18,15 @@ Pod::Spec.new do |s|
|
|
|
18
18
|
s.exclude_files = "ios/build/**/*"
|
|
19
19
|
s.library = "z"
|
|
20
20
|
|
|
21
|
-
#
|
|
22
|
-
|
|
21
|
+
# React Native core dependencies so headers like `React/RCTBridgeModule.h`
|
|
22
|
+
# are always available, regardless of React Native version or architecture.
|
|
23
|
+
# On modern React Native, `React-Core` is the canonical dependency.
|
|
24
|
+
s.dependency "React-Core"
|
|
25
|
+
s.dependency "ReactCommon/turbomodule/core"
|
|
26
|
+
|
|
27
|
+
# New Architecture / Codegen integration (RN 0.71+). On older RN versions
|
|
28
|
+
# this helper is not defined, so we guard it.
|
|
29
|
+
if respond_to?(:install_modules_dependencies)
|
|
30
|
+
install_modules_dependencies(s)
|
|
31
|
+
end
|
|
23
32
|
end
|