react-native 0.76.0-rc.3 → 0.76.0-rc.4
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/Libraries/AppDelegate/RCTAppDelegate.mm +1 -14
- package/Libraries/AppDelegate/RCTRootViewFactory.h +5 -23
- package/Libraries/AppDelegate/RCTRootViewFactory.mm +19 -25
- package/Libraries/Core/ReactNativeVersion.js +1 -1
- package/Libraries/Core/setUpDeveloperTools.js +5 -1
- package/Libraries/Utilities/HMRClient.js +6 -5
- package/React/Base/RCTVersion.m +1 -1
- package/React/Fabric/Mounting/ComponentViews/ScrollView/RCTPullToRefreshViewComponentView.mm +2 -2
- package/React/Views/RCTBorderDrawing.m +6 -3
- package/ReactAndroid/gradle.properties +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/flipper/ReactNativeFlipper.kt +2 -2
- package/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java +1 -1
- package/ReactCommon/cxxreact/ReactNativeVersion.h +1 -1
- package/ReactCommon/react/renderer/animations/LayoutAnimationKeyFrameManager.cpp +1 -4
- package/ReactCommon/react/renderer/animations/utils.h +45 -0
- package/ReactCommon/react/runtime/platform/ios/ReactCommon/RCTHost.h +5 -0
- package/ReactCommon/react/runtime/platform/ios/ReactCommon/RCTHost.mm +11 -0
- package/ReactCommon/react/runtime/platform/ios/ReactCommon/RCTInstance.h +5 -0
- package/ReactCommon/react/runtime/platform/ios/ReactCommon/RCTInstance.mm +1 -2
- package/package.json +8 -8
- package/scripts/cocoapods/utils.rb +2 -9
- package/sdks/hermesc/osx-bin/hermes +0 -0
- package/sdks/hermesc/osx-bin/hermesc +0 -0
- package/sdks/hermesc/win64-bin/hermesc.exe +0 -0
|
@@ -275,19 +275,6 @@
|
|
|
275
275
|
return [weakSelf sourceURLForBridge:bridge];
|
|
276
276
|
};
|
|
277
277
|
|
|
278
|
-
configuration.hostDidStartBlock = ^(RCTHost *_Nonnull host) {
|
|
279
|
-
[weakSelf hostDidStart:host];
|
|
280
|
-
};
|
|
281
|
-
|
|
282
|
-
configuration.hostDidReceiveJSErrorStackBlock =
|
|
283
|
-
^(RCTHost *_Nonnull host,
|
|
284
|
-
NSArray<NSDictionary<NSString *, id> *> *_Nonnull stack,
|
|
285
|
-
NSString *_Nonnull message,
|
|
286
|
-
NSUInteger exceptionId,
|
|
287
|
-
BOOL isFatal) {
|
|
288
|
-
[weakSelf host:host didReceiveJSErrorStack:stack message:message exceptionId:exceptionId isFatal:isFatal];
|
|
289
|
-
};
|
|
290
|
-
|
|
291
278
|
if ([self respondsToSelector:@selector(extraModulesForBridge:)]) {
|
|
292
279
|
configuration.extraModulesForBridge = ^NSArray<id<RCTBridgeModule>> *_Nonnull(RCTBridge *_Nonnull bridge)
|
|
293
280
|
{
|
|
@@ -309,7 +296,7 @@
|
|
|
309
296
|
};
|
|
310
297
|
}
|
|
311
298
|
|
|
312
|
-
return [[RCTRootViewFactory alloc]
|
|
299
|
+
return [[RCTRootViewFactory alloc] initWithTurboModuleDelegate:self hostDelegate:self configuration:configuration];
|
|
313
300
|
}
|
|
314
301
|
|
|
315
302
|
#pragma mark - Feature Flags
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
@protocol RCTCxxBridgeDelegate;
|
|
13
13
|
@protocol RCTComponentViewFactoryComponentProvider;
|
|
14
14
|
@protocol RCTTurboModuleManagerDelegate;
|
|
15
|
+
@protocol RCTHostDelegate;
|
|
15
16
|
@class RCTBridge;
|
|
16
17
|
@class RCTHost;
|
|
17
18
|
@class RCTRootView;
|
|
@@ -30,13 +31,6 @@ typedef NSURL *_Nullable (^RCTBundleURLBlock)(void);
|
|
|
30
31
|
typedef NSArray<id<RCTBridgeModule>> *_Nonnull (^RCTExtraModulesForBridgeBlock)(RCTBridge *bridge);
|
|
31
32
|
typedef NSDictionary<NSString *, Class> *_Nonnull (^RCTExtraLazyModuleClassesForBridge)(RCTBridge *bridge);
|
|
32
33
|
typedef BOOL (^RCTBridgeDidNotFindModuleBlock)(RCTBridge *bridge, NSString *moduleName);
|
|
33
|
-
typedef void (^RCTHostDidStartBlock)(RCTHost *host);
|
|
34
|
-
typedef void (^RCTHostDidReceiveJSErrorStackBlock)(
|
|
35
|
-
RCTHost *host,
|
|
36
|
-
NSArray<NSDictionary<NSString *, id> *> *stack,
|
|
37
|
-
NSString *message,
|
|
38
|
-
NSUInteger exceptionId,
|
|
39
|
-
BOOL isFatal);
|
|
40
34
|
|
|
41
35
|
#pragma mark - RCTRootViewFactory Configuration
|
|
42
36
|
@interface RCTRootViewFactoryConfiguration : NSObject
|
|
@@ -147,22 +141,6 @@ typedef void (^RCTHostDidReceiveJSErrorStackBlock)(
|
|
|
147
141
|
*/
|
|
148
142
|
@property (nonatomic, nullable) RCTBridgeDidNotFindModuleBlock bridgeDidNotFindModule;
|
|
149
143
|
|
|
150
|
-
/**
|
|
151
|
-
* Called when `RCTHost` started.
|
|
152
|
-
* @parameter: host - The started `RCTHost`.
|
|
153
|
-
*/
|
|
154
|
-
@property (nonatomic, nullable) RCTHostDidStartBlock hostDidStartBlock;
|
|
155
|
-
|
|
156
|
-
/**
|
|
157
|
-
* Called when `RCTHost` received JS error.
|
|
158
|
-
* @parameter: host - `RCTHost` which received js error.
|
|
159
|
-
* @parameter: stack - JS error stack.
|
|
160
|
-
* @parameter: message - Error message.
|
|
161
|
-
* @parameter: exceptionId - Exception ID.
|
|
162
|
-
* @parameter: isFatal - YES if JS error is fatal.
|
|
163
|
-
*/
|
|
164
|
-
@property (nonatomic, nullable) RCTHostDidReceiveJSErrorStackBlock hostDidReceiveJSErrorStackBlock;
|
|
165
|
-
|
|
166
144
|
@end
|
|
167
145
|
|
|
168
146
|
#pragma mark - RCTRootViewFactory
|
|
@@ -187,6 +165,10 @@ typedef void (^RCTHostDidReceiveJSErrorStackBlock)(
|
|
|
187
165
|
|
|
188
166
|
- (instancetype)initWithConfiguration:(RCTRootViewFactoryConfiguration *)configuration;
|
|
189
167
|
|
|
168
|
+
- (instancetype)initWithTurboModuleDelegate:(id<RCTTurboModuleManagerDelegate>)turboModuleManagerDelegate
|
|
169
|
+
hostDelegate:(id<RCTHostDelegate>)hostdelegate
|
|
170
|
+
configuration:(RCTRootViewFactoryConfiguration *)configuration;
|
|
171
|
+
|
|
190
172
|
/**
|
|
191
173
|
* This method can be used to create new RCTRootViews on demand.
|
|
192
174
|
*
|
|
@@ -83,7 +83,7 @@ static NSDictionary *updateInitialProps(NSDictionary *initialProps, BOOL isFabri
|
|
|
83
83
|
|
|
84
84
|
@end
|
|
85
85
|
|
|
86
|
-
@interface RCTRootViewFactory () <RCTContextContainerHandling
|
|
86
|
+
@interface RCTRootViewFactory () <RCTContextContainerHandling> {
|
|
87
87
|
std::shared_ptr<const facebook::react::ReactNativeConfig> _reactNativeConfig;
|
|
88
88
|
facebook::react::ContextContainer::Shared _contextContainer;
|
|
89
89
|
}
|
|
@@ -95,15 +95,18 @@ static NSDictionary *updateInitialProps(NSDictionary *initialProps, BOOL isFabri
|
|
|
95
95
|
@end
|
|
96
96
|
|
|
97
97
|
@implementation RCTRootViewFactory {
|
|
98
|
-
RCTRootViewFactoryConfiguration *_configuration;
|
|
99
98
|
__weak id<RCTTurboModuleManagerDelegate> _turboModuleManagerDelegate;
|
|
99
|
+
__weak id<RCTHostDelegate> _hostDelegate;
|
|
100
|
+
RCTRootViewFactoryConfiguration *_configuration;
|
|
100
101
|
}
|
|
101
102
|
|
|
102
|
-
- (instancetype)
|
|
103
|
-
|
|
103
|
+
- (instancetype)initWithTurboModuleDelegate:(id<RCTTurboModuleManagerDelegate>)turboModuleManagerDelegate
|
|
104
|
+
hostDelegate:(id<RCTHostDelegate>)hostdelegate
|
|
105
|
+
configuration:(RCTRootViewFactoryConfiguration *)configuration
|
|
104
106
|
{
|
|
105
107
|
if (self = [super init]) {
|
|
106
108
|
_configuration = configuration;
|
|
109
|
+
_hostDelegate = hostdelegate;
|
|
107
110
|
_contextContainer = std::make_shared<const facebook::react::ContextContainer>();
|
|
108
111
|
_reactNativeConfig = std::make_shared<const facebook::react::EmptyReactNativeConfig>();
|
|
109
112
|
_contextContainer->insert("ReactNativeConfig", _reactNativeConfig);
|
|
@@ -112,6 +115,17 @@ static NSDictionary *updateInitialProps(NSDictionary *initialProps, BOOL isFabri
|
|
|
112
115
|
return self;
|
|
113
116
|
}
|
|
114
117
|
|
|
118
|
+
- (instancetype)initWithConfiguration:(RCTRootViewFactoryConfiguration *)configuration
|
|
119
|
+
andTurboModuleManagerDelegate:(id<RCTTurboModuleManagerDelegate>)turboModuleManagerDelegate
|
|
120
|
+
{
|
|
121
|
+
id<RCTHostDelegate> hostDelegate = [turboModuleManagerDelegate conformsToProtocol:@protocol(RCTHostDelegate)]
|
|
122
|
+
? (id<RCTHostDelegate>)turboModuleManagerDelegate
|
|
123
|
+
: nil;
|
|
124
|
+
return [self initWithTurboModuleDelegate:turboModuleManagerDelegate
|
|
125
|
+
hostDelegate:hostDelegate
|
|
126
|
+
configuration:configuration];
|
|
127
|
+
}
|
|
128
|
+
|
|
115
129
|
- (instancetype)initWithConfiguration:(RCTRootViewFactoryConfiguration *)configuration
|
|
116
130
|
{
|
|
117
131
|
return [self initWithConfiguration:configuration andTurboModuleManagerDelegate:nil];
|
|
@@ -188,26 +202,6 @@ static NSDictionary *updateInitialProps(NSDictionary *initialProps, BOOL isFabri
|
|
|
188
202
|
return rootView;
|
|
189
203
|
}
|
|
190
204
|
|
|
191
|
-
#pragma mark - RCTHostDelegate
|
|
192
|
-
|
|
193
|
-
- (void)hostDidStart:(RCTHost *)host
|
|
194
|
-
{
|
|
195
|
-
if (self->_configuration.hostDidStartBlock) {
|
|
196
|
-
self->_configuration.hostDidStartBlock(host);
|
|
197
|
-
}
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
- (void)host:(RCTHost *)host
|
|
201
|
-
didReceiveJSErrorStack:(NSArray<NSDictionary<NSString *, id> *> *)stack
|
|
202
|
-
message:(NSString *)message
|
|
203
|
-
exceptionId:(NSUInteger)exceptionId
|
|
204
|
-
isFatal:(BOOL)isFatal
|
|
205
|
-
{
|
|
206
|
-
if (self->_configuration.hostDidReceiveJSErrorStackBlock) {
|
|
207
|
-
self->_configuration.hostDidReceiveJSErrorStackBlock(host, stack, message, exceptionId, isFatal);
|
|
208
|
-
}
|
|
209
|
-
}
|
|
210
|
-
|
|
211
205
|
#pragma mark - RCTCxxBridgeDelegate
|
|
212
206
|
- (std::unique_ptr<facebook::react::JSExecutorFactory>)jsExecutorFactoryForBridge:(RCTBridge *)bridge
|
|
213
207
|
{
|
|
@@ -266,7 +260,7 @@ static NSDictionary *updateInitialProps(NSDictionary *initialProps, BOOL isFabri
|
|
|
266
260
|
__weak __typeof(self) weakSelf = self;
|
|
267
261
|
RCTHost *reactHost =
|
|
268
262
|
[[RCTHost alloc] initWithBundleURLProvider:self->_configuration.bundleURLBlock
|
|
269
|
-
hostDelegate:
|
|
263
|
+
hostDelegate:_hostDelegate
|
|
270
264
|
turboModuleManagerDelegate:_turboModuleManagerDelegate
|
|
271
265
|
jsEngineProvider:^std::shared_ptr<facebook::react::JSRuntimeFactory>() {
|
|
272
266
|
return [weakSelf createJSRuntimeFactory];
|
|
@@ -42,9 +42,13 @@ if (__DEV__) {
|
|
|
42
42
|
if (!Platform.isTesting) {
|
|
43
43
|
const HMRClient = require('../Utilities/HMRClient');
|
|
44
44
|
|
|
45
|
+
// [0.76 only] When under React Native DevTools, log "JavaScript logs will
|
|
46
|
+
// be removed from Metro..." warning, and continue to forward logs.
|
|
45
47
|
if (global.__FUSEBOX_HAS_FULL_CONSOLE_SUPPORT__) {
|
|
46
48
|
HMRClient.unstable_notifyFuseboxConsoleEnabled();
|
|
47
|
-
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
if (console._isPolyfilled) {
|
|
48
52
|
// We assume full control over the console and send JavaScript logs to Metro.
|
|
49
53
|
[
|
|
50
54
|
'trace',
|
|
@@ -153,11 +153,12 @@ const HMRClient: HMRClientNativeInterface = {
|
|
|
153
153
|
level: 'info',
|
|
154
154
|
data: [
|
|
155
155
|
'\n' +
|
|
156
|
-
'\
|
|
157
|
-
' \
|
|
158
|
-
'
|
|
159
|
-
'
|
|
160
|
-
'
|
|
156
|
+
'\u001B[7m' +
|
|
157
|
+
' \u001B[1m💡 JavaScript logs will be removed from Metro in React ' +
|
|
158
|
+
'Native 0.77!\u001B[22m Please use React Native DevTools as your ' +
|
|
159
|
+
'default tool. Tip: Type \u001B[1mj\u001B[22m in the terminal to ' +
|
|
160
|
+
'open (requires Google Chrome or Microsoft Edge).' +
|
|
161
|
+
'\u001B[27m' +
|
|
161
162
|
'\n',
|
|
162
163
|
],
|
|
163
164
|
}),
|
package/React/Base/RCTVersion.m
CHANGED
package/React/Fabric/Mounting/ComponentViews/ScrollView/RCTPullToRefreshViewComponentView.mm
CHANGED
|
@@ -101,11 +101,11 @@ using namespace facebook::react;
|
|
|
101
101
|
needsUpdateTitle = YES;
|
|
102
102
|
}
|
|
103
103
|
|
|
104
|
+
[super updateProps:props oldProps:oldProps];
|
|
105
|
+
|
|
104
106
|
if (needsUpdateTitle) {
|
|
105
107
|
[self _updateTitle];
|
|
106
108
|
}
|
|
107
|
-
|
|
108
|
-
[super updateProps:props oldProps:oldProps];
|
|
109
109
|
}
|
|
110
110
|
|
|
111
111
|
#pragma mark -
|
|
@@ -182,7 +182,7 @@ static CGPathRef RCTPathCreateOuterOutline(BOOL drawToEdge, CGRect rect, RCTCorn
|
|
|
182
182
|
}
|
|
183
183
|
|
|
184
184
|
static UIGraphicsImageRenderer *
|
|
185
|
-
|
|
185
|
+
RCTMakeUIGraphicsImageRenderer(CGSize size, CGColorRef backgroundColor, BOOL hasCornerRadii, BOOL drawToEdge)
|
|
186
186
|
{
|
|
187
187
|
const CGFloat alpha = CGColorGetAlpha(backgroundColor);
|
|
188
188
|
const BOOL opaque = (drawToEdge || !hasCornerRadii) && alpha == 1.0;
|
|
@@ -231,7 +231,9 @@ static UIImage *RCTGetSolidBorderImage(
|
|
|
231
231
|
} : viewSize;
|
|
232
232
|
|
|
233
233
|
UIGraphicsImageRenderer *const imageRenderer =
|
|
234
|
-
|
|
234
|
+
RCTMakeUIGraphicsImageRenderer(size, backgroundColor, hasCornerRadii, drawToEdge);
|
|
235
|
+
|
|
236
|
+
CGColorRetain(backgroundColor);
|
|
235
237
|
UIImage *image = [imageRenderer imageWithActions:^(UIGraphicsImageRendererContext *_Nonnull rendererContext) {
|
|
236
238
|
const CGContextRef context = rendererContext.CGContext;
|
|
237
239
|
const CGRect rect = {.size = size};
|
|
@@ -242,6 +244,7 @@ static UIImage *RCTGetSolidBorderImage(
|
|
|
242
244
|
CGContextAddPath(context, path);
|
|
243
245
|
CGContextFillPath(context);
|
|
244
246
|
}
|
|
247
|
+
CGColorRelease(backgroundColor);
|
|
245
248
|
|
|
246
249
|
CGContextAddPath(context, path);
|
|
247
250
|
CGPathRelease(path);
|
|
@@ -481,7 +484,7 @@ static UIImage *RCTGetDashedOrDottedBorderImage(
|
|
|
481
484
|
|
|
482
485
|
const BOOL hasCornerRadii = RCTCornerRadiiAreAboveThreshold(cornerRadii);
|
|
483
486
|
UIGraphicsImageRenderer *const imageRenderer =
|
|
484
|
-
|
|
487
|
+
RCTMakeUIGraphicsImageRenderer(viewSize, backgroundColor, hasCornerRadii, drawToEdge);
|
|
485
488
|
return [imageRenderer imageWithActions:^(UIGraphicsImageRendererContext *_Nonnull rendererContext) {
|
|
486
489
|
const CGContextRef context = rendererContext.CGContext;
|
|
487
490
|
const CGRect rect = {.size = viewSize};
|
|
@@ -19,7 +19,7 @@ import com.facebook.react.ReactInstanceManager
|
|
|
19
19
|
message =
|
|
20
20
|
"ReactNative/Flipper integration is deprecated. Please remove the call to initializeFlipper from your MainApplication.java",
|
|
21
21
|
replaceWith = ReplaceWith(""),
|
|
22
|
-
level = DeprecationLevel.
|
|
22
|
+
level = DeprecationLevel.ERROR)
|
|
23
23
|
public object ReactNativeFlipper {
|
|
24
24
|
@Suppress("UNUSED_PARAMETER")
|
|
25
25
|
@JvmStatic
|
|
@@ -27,7 +27,7 @@ public object ReactNativeFlipper {
|
|
|
27
27
|
message =
|
|
28
28
|
"ReactNative/Flipper integration is deprecated. Please remove the call to initializeFlipper from your MainApplication.java",
|
|
29
29
|
replaceWith = ReplaceWith(""),
|
|
30
|
-
level = DeprecationLevel.
|
|
30
|
+
level = DeprecationLevel.ERROR)
|
|
31
31
|
public fun initializeFlipper(context: Context, reactInstanceManager: ReactInstanceManager) {
|
|
32
32
|
// no-op
|
|
33
33
|
}
|
|
@@ -790,10 +790,7 @@ LayoutAnimationKeyFrameManager::pullTransaction(
|
|
|
790
790
|
finalConflictingMutations.end(),
|
|
791
791
|
&shouldFirstComeBeforeSecondMutation);
|
|
792
792
|
|
|
793
|
-
|
|
794
|
-
immediateMutations.begin(),
|
|
795
|
-
immediateMutations.end(),
|
|
796
|
-
&shouldFirstComeBeforeSecondRemovesOnly);
|
|
793
|
+
handleShouldFirstComeBeforeSecondRemovesOnly(immediateMutations);
|
|
797
794
|
|
|
798
795
|
animation.keyFrames = keyFramesToAnimate;
|
|
799
796
|
inflightAnimations_.push_back(std::move(animation));
|
|
@@ -24,6 +24,40 @@ static inline bool shouldFirstComeBeforeSecondRemovesOnly(
|
|
|
24
24
|
(lhs.index > rhs.index);
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
+
static inline void handleShouldFirstComeBeforeSecondRemovesOnly(
|
|
28
|
+
ShadowViewMutation::List& list) noexcept {
|
|
29
|
+
std::unordered_map<std::string, std::vector<ShadowViewMutation>>
|
|
30
|
+
removeMutationsByTag;
|
|
31
|
+
ShadowViewMutation::List finalList;
|
|
32
|
+
for (auto& mutation : list) {
|
|
33
|
+
if (mutation.type == ShadowViewMutation::Type::Remove) {
|
|
34
|
+
auto key = std::to_string(mutation.parentShadowView.tag);
|
|
35
|
+
removeMutationsByTag[key].push_back(mutation);
|
|
36
|
+
} else {
|
|
37
|
+
finalList.push_back(mutation);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
if (removeMutationsByTag.size() == 0) {
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
for (auto& mutationsPair : removeMutationsByTag) {
|
|
46
|
+
if (mutationsPair.second.size() > 1) {
|
|
47
|
+
std::stable_sort(
|
|
48
|
+
mutationsPair.second.begin(),
|
|
49
|
+
mutationsPair.second.end(),
|
|
50
|
+
&shouldFirstComeBeforeSecondRemovesOnly);
|
|
51
|
+
}
|
|
52
|
+
finalList.insert(
|
|
53
|
+
finalList.begin(),
|
|
54
|
+
mutationsPair.second.begin(),
|
|
55
|
+
mutationsPair.second.end());
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
list = finalList;
|
|
59
|
+
}
|
|
60
|
+
|
|
27
61
|
static inline bool shouldFirstComeBeforeSecondMutation(
|
|
28
62
|
const ShadowViewMutation& lhs,
|
|
29
63
|
const ShadowViewMutation& rhs) noexcept {
|
|
@@ -55,6 +89,17 @@ static inline bool shouldFirstComeBeforeSecondMutation(
|
|
|
55
89
|
lhs.type == ShadowViewMutation::Type::Insert) {
|
|
56
90
|
return false;
|
|
57
91
|
}
|
|
92
|
+
|
|
93
|
+
// Remove comes before Update
|
|
94
|
+
if (lhs.type == ShadowViewMutation::Type::Remove &&
|
|
95
|
+
rhs.type == ShadowViewMutation::Type::Update) {
|
|
96
|
+
return true;
|
|
97
|
+
}
|
|
98
|
+
if (rhs.type == ShadowViewMutation::Type::Remove &&
|
|
99
|
+
lhs.type == ShadowViewMutation::Type::Update) {
|
|
100
|
+
return false;
|
|
101
|
+
}
|
|
102
|
+
|
|
58
103
|
} else {
|
|
59
104
|
// Make sure that removes on the same level are sorted - highest indices
|
|
60
105
|
// must come first.
|
|
@@ -35,6 +35,11 @@ typedef NSURL *_Nullable (^RCTHostBundleURLProvider)(void);
|
|
|
35
35
|
|
|
36
36
|
- (void)hostDidStart:(RCTHost *)host;
|
|
37
37
|
|
|
38
|
+
@optional
|
|
39
|
+
- (void)loadBundleAtURL:(NSURL *)sourceURL
|
|
40
|
+
onProgress:(RCTSourceLoadProgressBlock)onProgress
|
|
41
|
+
onComplete:(RCTSourceLoadBlock)loadCallback;
|
|
42
|
+
|
|
38
43
|
@end
|
|
39
44
|
|
|
40
45
|
@protocol RCTHostRuntimeDelegate <NSObject>
|
|
@@ -329,6 +329,17 @@ class RCTHostHostTargetDelegate : public facebook::react::jsinspector_modern::Ho
|
|
|
329
329
|
[self.runtimeDelegate host:self didInitializeRuntime:runtime];
|
|
330
330
|
}
|
|
331
331
|
|
|
332
|
+
- (void)loadBundleAtURL:(NSURL *)sourceURL
|
|
333
|
+
onProgress:(RCTSourceLoadProgressBlock)onProgress
|
|
334
|
+
onComplete:(RCTSourceLoadBlock)loadCallback
|
|
335
|
+
{
|
|
336
|
+
if ([_hostDelegate respondsToSelector:@selector(loadBundleAtURL:onProgress:onComplete:)]) {
|
|
337
|
+
[_hostDelegate loadBundleAtURL:sourceURL onProgress:onProgress onComplete:loadCallback];
|
|
338
|
+
} else {
|
|
339
|
+
[RCTJavaScriptLoader loadBundleAtURL:sourceURL onProgress:onProgress onComplete:loadCallback];
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
|
|
332
343
|
#pragma mark - RCTContextContainerHandling
|
|
333
344
|
|
|
334
345
|
- (void)didCreateContextContainer:(std::shared_ptr<facebook::react::ContextContainer>)contextContainer
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
#import <UIKit/UIKit.h>
|
|
9
9
|
|
|
10
10
|
#import <React/RCTDefines.h>
|
|
11
|
+
#import <React/RCTJavaScriptLoader.h>
|
|
11
12
|
#import <jsinspector-modern/ReactCdp.h>
|
|
12
13
|
#import <react/runtime/JSRuntimeFactory.h>
|
|
13
14
|
#import <react/runtime/ReactInstance.h>
|
|
@@ -44,6 +45,10 @@ RCT_EXTERN void RCTInstanceSetRuntimeDiagnosticFlags(NSString *_Nullable flags);
|
|
|
44
45
|
|
|
45
46
|
- (void)instance:(RCTInstance *)instance didInitializeRuntime:(facebook::jsi::Runtime &)runtime;
|
|
46
47
|
|
|
48
|
+
- (void)loadBundleAtURL:(NSURL *)sourceURL
|
|
49
|
+
onProgress:(RCTSourceLoadProgressBlock)onProgress
|
|
50
|
+
onComplete:(RCTSourceLoadBlock)loadCallback;
|
|
51
|
+
|
|
47
52
|
@end
|
|
48
53
|
|
|
49
54
|
/**
|
|
@@ -25,7 +25,6 @@
|
|
|
25
25
|
#import <React/RCTDisplayLink.h>
|
|
26
26
|
#import <React/RCTEventDispatcherProtocol.h>
|
|
27
27
|
#import <React/RCTFollyConvert.h>
|
|
28
|
-
#import <React/RCTJavaScriptLoader.h>
|
|
29
28
|
#import <React/RCTLog.h>
|
|
30
29
|
#import <React/RCTLogBox.h>
|
|
31
30
|
#import <React/RCTModuleData.h>
|
|
@@ -428,7 +427,7 @@ void RCTInstanceSetRuntimeDiagnosticFlags(NSString *flags)
|
|
|
428
427
|
#endif
|
|
429
428
|
|
|
430
429
|
__weak __typeof(self) weakSelf = self;
|
|
431
|
-
[
|
|
430
|
+
[_delegate loadBundleAtURL:sourceURL
|
|
432
431
|
onProgress:^(RCTLoadingProgress *progressData) {
|
|
433
432
|
__typeof(self) strongSelf = weakSelf;
|
|
434
433
|
if (!strongSelf) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native",
|
|
3
|
-
"version": "0.76.0-rc.
|
|
3
|
+
"version": "0.76.0-rc.4",
|
|
4
4
|
"description": "A framework for building native apps using React",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -109,13 +109,13 @@
|
|
|
109
109
|
},
|
|
110
110
|
"dependencies": {
|
|
111
111
|
"@jest/create-cache-key-function": "^29.6.3",
|
|
112
|
-
"@react-native/assets-registry": "0.76.0-rc.
|
|
113
|
-
"@react-native/codegen": "0.76.0-rc.
|
|
114
|
-
"@react-native/community-cli-plugin": "0.76.0-rc.
|
|
115
|
-
"@react-native/gradle-plugin": "0.76.0-rc.
|
|
116
|
-
"@react-native/js-polyfills": "0.76.0-rc.
|
|
117
|
-
"@react-native/normalize-colors": "0.76.0-rc.
|
|
118
|
-
"@react-native/virtualized-lists": "0.76.0-rc.
|
|
112
|
+
"@react-native/assets-registry": "0.76.0-rc.4",
|
|
113
|
+
"@react-native/codegen": "0.76.0-rc.4",
|
|
114
|
+
"@react-native/community-cli-plugin": "0.76.0-rc.4",
|
|
115
|
+
"@react-native/gradle-plugin": "0.76.0-rc.4",
|
|
116
|
+
"@react-native/js-polyfills": "0.76.0-rc.4",
|
|
117
|
+
"@react-native/normalize-colors": "0.76.0-rc.4",
|
|
118
|
+
"@react-native/virtualized-lists": "0.76.0-rc.4",
|
|
119
119
|
"abort-controller": "^3.0.0",
|
|
120
120
|
"anser": "^1.4.9",
|
|
121
121
|
"ansi-regex": "^5.0.0",
|
|
@@ -236,16 +236,9 @@ class ReactNativePodsUtils
|
|
|
236
236
|
if !file_manager.exist?("#{file_path}.local")
|
|
237
237
|
# When installing pods with a yarn alias, yarn creates a fake yarn and node executables
|
|
238
238
|
# in a temporary folder.
|
|
239
|
-
# Using `
|
|
240
|
-
# exclude the temporary ones.
|
|
239
|
+
# Using `node --print "process.argv[0]";` we are able to retrieve the actual path from which node is running.
|
|
241
240
|
# see https://github.com/facebook/react-native/issues/43285 for more info
|
|
242
|
-
node_binary = `
|
|
243
|
-
path.gsub!("node is ", "")
|
|
244
|
-
}.select { |b|
|
|
245
|
-
!b.start_with?("/var")
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
node_binary = node_binary[0]
|
|
241
|
+
node_binary = `node --print "process.argv[0]";`
|
|
249
242
|
system("echo 'export NODE_BINARY=#{node_binary}' > #{file_path}.local")
|
|
250
243
|
end
|
|
251
244
|
end
|
|
Binary file
|
|
Binary file
|
|
Binary file
|