react-native-macos 0.71.32 → 0.71.34
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/Core/ReactNativeVersion.js +1 -1
- package/Libraries/ReactNative/AppContainer.js +28 -6
- package/React/Base/RCTBundleURLProvider.h +38 -3
- package/React/Base/RCTBundleURLProvider.mm +77 -21
- package/React/Base/RCTUIKit.h +2 -1
- package/React/Base/RCTVersion.m +1 -1
- package/ReactAndroid/gradle.properties +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/DevSupportManagerBase.java +19 -1
- package/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java +1 -1
- package/ReactCommon/cxxreact/ReactNativeVersion.h +1 -1
- package/ReactCommon/jsc/JSCRuntime.cpp +10 -0
- package/package.json +3 -3
- package/template/package.json +1 -1
|
@@ -17,6 +17,8 @@ import {type EventSubscription} from '../vendor/emitter/EventEmitter';
|
|
|
17
17
|
import {RootTagContext, createRootTag} from './RootTag';
|
|
18
18
|
import * as React from 'react';
|
|
19
19
|
|
|
20
|
+
const reactDevToolsHook = window.__REACT_DEVTOOLS_GLOBAL_HOOK__;
|
|
21
|
+
|
|
20
22
|
type Props = $ReadOnly<{|
|
|
21
23
|
children?: React.Node,
|
|
22
24
|
fabric?: boolean,
|
|
@@ -45,9 +47,17 @@ class AppContainer extends React.Component<Props, State> {
|
|
|
45
47
|
};
|
|
46
48
|
_mainRef: ?React.ElementRef<typeof View>;
|
|
47
49
|
_subscription: ?EventSubscription = null;
|
|
50
|
+
_reactDevToolsAgentListener: ?() => void = null;
|
|
48
51
|
|
|
49
52
|
static getDerivedStateFromError: any = undefined;
|
|
50
53
|
|
|
54
|
+
mountReactDevToolsOverlays(): void {
|
|
55
|
+
const DevtoolsOverlay = require('../Inspector/DevtoolsOverlay').default;
|
|
56
|
+
const devtoolsOverlay = <DevtoolsOverlay inspectedView={this._mainRef} />;
|
|
57
|
+
|
|
58
|
+
this.setState({devtoolsOverlay});
|
|
59
|
+
}
|
|
60
|
+
|
|
51
61
|
componentDidMount(): void {
|
|
52
62
|
if (__DEV__) {
|
|
53
63
|
if (!this.props.internal_excludeInspector) {
|
|
@@ -69,13 +79,21 @@ class AppContainer extends React.Component<Props, State> {
|
|
|
69
79
|
this.setState({inspector});
|
|
70
80
|
},
|
|
71
81
|
);
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
82
|
+
|
|
83
|
+
if (reactDevToolsHook != null) {
|
|
84
|
+
if (reactDevToolsHook.reactDevtoolsAgent) {
|
|
85
|
+
// In case if this is not the first AppContainer rendered and React DevTools are already attached
|
|
86
|
+
this.mountReactDevToolsOverlays();
|
|
87
|
+
return;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
this._reactDevToolsAgentListener = () =>
|
|
91
|
+
this.mountReactDevToolsOverlays();
|
|
92
|
+
|
|
93
|
+
reactDevToolsHook.on(
|
|
94
|
+
'react-devtools',
|
|
95
|
+
this._reactDevToolsAgentListener,
|
|
77
96
|
);
|
|
78
|
-
this.setState({devtoolsOverlay});
|
|
79
97
|
}
|
|
80
98
|
}
|
|
81
99
|
}
|
|
@@ -85,6 +103,10 @@ class AppContainer extends React.Component<Props, State> {
|
|
|
85
103
|
if (this._subscription != null) {
|
|
86
104
|
this._subscription.remove();
|
|
87
105
|
}
|
|
106
|
+
|
|
107
|
+
if (reactDevToolsHook != null && this._reactDevToolsAgentListener != null) {
|
|
108
|
+
reactDevToolsHook.off('react-devtools', this._reactDevToolsAgentListener);
|
|
109
|
+
}
|
|
88
110
|
}
|
|
89
111
|
|
|
90
112
|
render(): React.Node {
|
|
@@ -22,7 +22,11 @@ RCT_EXTERN const NSUInteger kRCTBundleURLProviderDefaultPort;
|
|
|
22
22
|
RCT_EXTERN void RCTBundleURLProviderAllowPackagerServerAccess(BOOL allowed);
|
|
23
23
|
#endif
|
|
24
24
|
|
|
25
|
-
|
|
25
|
+
#if !TARGET_OS_OSX // [macOS]
|
|
26
|
+
static NSString *const kRCTPlatformName = @"ios";
|
|
27
|
+
#else // [macOS
|
|
28
|
+
static NSString *const kRCTPlatformName = @"macos";
|
|
29
|
+
#endif // macOS] // [macOS]
|
|
26
30
|
|
|
27
31
|
@interface RCTBundleURLProvider : NSObject
|
|
28
32
|
|
|
@@ -103,6 +107,7 @@ extern NSString *const kRCTPlatformName; // [macOS]
|
|
|
103
107
|
|
|
104
108
|
@property (nonatomic, assign) BOOL enableMinification;
|
|
105
109
|
@property (nonatomic, assign) BOOL enableDev;
|
|
110
|
+
@property (nonatomic, assign) BOOL inlineSourceMap;
|
|
106
111
|
|
|
107
112
|
/**
|
|
108
113
|
* The scheme/protocol used of the packager, the default is the http protocol
|
|
@@ -127,13 +132,32 @@ extern NSString *const kRCTPlatformName; // [macOS]
|
|
|
127
132
|
+ (NSURL *)jsBundleURLForBundleRoot:(NSString *)bundleRoot
|
|
128
133
|
packagerHost:(NSString *)packagerHost
|
|
129
134
|
enableDev:(BOOL)enableDev
|
|
130
|
-
enableMinification:(BOOL)enableMinification
|
|
135
|
+
enableMinification:(BOOL)enableMinification
|
|
136
|
+
__deprecated_msg(
|
|
137
|
+
"Use `jsBundleURLForBundleRoot:packagerHost:enableDev:enableMinification:inlineSourceMap:` instead");
|
|
138
|
+
|
|
139
|
+
+ (NSURL *)jsBundleURLForBundleRoot:(NSString *)bundleRoot
|
|
140
|
+
packagerHost:(NSString *)packagerHost
|
|
141
|
+
packagerScheme:(NSString *)scheme
|
|
142
|
+
enableDev:(BOOL)enableDev
|
|
143
|
+
enableMinification:(BOOL)enableMinification
|
|
144
|
+
modulesOnly:(BOOL)modulesOnly
|
|
145
|
+
runModule:(BOOL)runModule
|
|
146
|
+
__deprecated_msg(
|
|
147
|
+
"Use jsBundleURLForBundleRoot:packagerHost:enableDev:enableMinification:inlineSourceMap:modulesOnly:runModule:` instead");
|
|
148
|
+
|
|
149
|
+
+ (NSURL *)jsBundleURLForBundleRoot:(NSString *)bundleRoot
|
|
150
|
+
packagerHost:(NSString *)packagerHost
|
|
151
|
+
enableDev:(BOOL)enableDev
|
|
152
|
+
enableMinification:(BOOL)enableMinification
|
|
153
|
+
inlineSourceMap:(BOOL)inlineSourceMap;
|
|
131
154
|
|
|
132
155
|
+ (NSURL *)jsBundleURLForBundleRoot:(NSString *)bundleRoot
|
|
133
156
|
packagerHost:(NSString *)packagerHost
|
|
134
157
|
packagerScheme:(NSString *)scheme
|
|
135
158
|
enableDev:(BOOL)enableDev
|
|
136
159
|
enableMinification:(BOOL)enableMinification
|
|
160
|
+
inlineSourceMap:(BOOL)inlineSourceMap
|
|
137
161
|
modulesOnly:(BOOL)modulesOnly
|
|
138
162
|
runModule:(BOOL)runModule;
|
|
139
163
|
/**
|
|
@@ -144,6 +168,17 @@ extern NSString *const kRCTPlatformName; // [macOS]
|
|
|
144
168
|
+ (NSURL *)resourceURLForResourcePath:(NSString *)path
|
|
145
169
|
packagerHost:(NSString *)packagerHost
|
|
146
170
|
scheme:(NSString *)scheme
|
|
147
|
-
query:(NSString *)query
|
|
171
|
+
query:(NSString *)query
|
|
172
|
+
__deprecated_msg("Use version with queryItems parameter instead");
|
|
173
|
+
|
|
174
|
+
/**
|
|
175
|
+
* Given a hostname for the packager and a resource path (including "/"), return the URL to the resource.
|
|
176
|
+
* In general, please use the instance method to decide if the packager is running and fallback to the pre-packaged
|
|
177
|
+
* resource if it is not: -resourceURLForResourceRoot:resourceName:resourceExtension:offlineBundle:
|
|
178
|
+
*/
|
|
179
|
+
+ (NSURL *)resourceURLForResourcePath:(NSString *)path
|
|
180
|
+
packagerHost:(NSString *)packagerHost
|
|
181
|
+
scheme:(NSString *)scheme
|
|
182
|
+
queryItems:(NSArray<NSURLQueryItem *> *)queryItems;
|
|
148
183
|
|
|
149
184
|
@end
|
|
@@ -15,12 +15,6 @@ NSString *const RCTBundleURLProviderUpdatedNotification = @"RCTBundleURLProvider
|
|
|
15
15
|
|
|
16
16
|
const NSUInteger kRCTBundleURLProviderDefaultPort = RCT_METRO_PORT;
|
|
17
17
|
|
|
18
|
-
#if !TARGET_OS_OSX // [macOS]
|
|
19
|
-
NSString *const kRCTPlatformName = @"ios";
|
|
20
|
-
#else // [macOS
|
|
21
|
-
NSString *const kRCTPlatformName = @"macos";
|
|
22
|
-
#endif // macOS]
|
|
23
|
-
|
|
24
18
|
#if RCT_DEV_MENU | RCT_PACKAGER_LOADING_FUNCTIONALITY
|
|
25
19
|
static BOOL kRCTAllowPackagerAccess = YES;
|
|
26
20
|
void RCTBundleURLProviderAllowPackagerServerAccess(BOOL allowed)
|
|
@@ -28,10 +22,12 @@ void RCTBundleURLProviderAllowPackagerServerAccess(BOOL allowed)
|
|
|
28
22
|
kRCTAllowPackagerAccess = allowed;
|
|
29
23
|
}
|
|
30
24
|
#endif
|
|
25
|
+
|
|
31
26
|
static NSString *const kRCTPackagerSchemeKey = @"RCT_packager_scheme";
|
|
32
27
|
static NSString *const kRCTJsLocationKey = @"RCT_jsLocation";
|
|
33
28
|
static NSString *const kRCTEnableDevKey = @"RCT_enableDev";
|
|
34
29
|
static NSString *const kRCTEnableMinificationKey = @"RCT_enableMinification";
|
|
30
|
+
static NSString *const kRCTInlineSourceMapKey = @"RCT_inlineSourceMap";
|
|
35
31
|
|
|
36
32
|
@implementation RCTBundleURLProvider
|
|
37
33
|
|
|
@@ -189,6 +185,7 @@ static NSURL *serverRootWithHostPort(NSString *hostPort, NSString *scheme)
|
|
|
189
185
|
packagerScheme:[self packagerScheme]
|
|
190
186
|
enableDev:[self enableDev]
|
|
191
187
|
enableMinification:[self enableMinification]
|
|
188
|
+
inlineSourceMap:[self inlineSourceMap]
|
|
192
189
|
modulesOnly:NO
|
|
193
190
|
runModule:YES];
|
|
194
191
|
}
|
|
@@ -201,6 +198,7 @@ static NSURL *serverRootWithHostPort(NSString *hostPort, NSString *scheme)
|
|
|
201
198
|
packagerScheme:[self packagerScheme]
|
|
202
199
|
enableDev:[self enableDev]
|
|
203
200
|
enableMinification:[self enableMinification]
|
|
201
|
+
inlineSourceMap:[self inlineSourceMap]
|
|
204
202
|
modulesOnly:YES
|
|
205
203
|
runModule:NO];
|
|
206
204
|
}
|
|
@@ -240,13 +238,29 @@ static NSURL *serverRootWithHostPort(NSString *hostPort, NSString *scheme)
|
|
|
240
238
|
return [[self class] resourceURLForResourcePath:path
|
|
241
239
|
packagerHost:packagerServerHostPort
|
|
242
240
|
scheme:packagerServerScheme
|
|
243
|
-
|
|
241
|
+
queryItems:nil];
|
|
244
242
|
}
|
|
245
243
|
|
|
246
244
|
+ (NSURL *)jsBundleURLForBundleRoot:(NSString *)bundleRoot
|
|
247
245
|
packagerHost:(NSString *)packagerHost
|
|
248
246
|
enableDev:(BOOL)enableDev
|
|
249
247
|
enableMinification:(BOOL)enableMinification
|
|
248
|
+
{
|
|
249
|
+
return [self jsBundleURLForBundleRoot:bundleRoot
|
|
250
|
+
packagerHost:packagerHost
|
|
251
|
+
packagerScheme:nil
|
|
252
|
+
enableDev:enableDev
|
|
253
|
+
enableMinification:enableMinification
|
|
254
|
+
inlineSourceMap:NO
|
|
255
|
+
modulesOnly:NO
|
|
256
|
+
runModule:YES];
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
+ (NSURL *)jsBundleURLForBundleRoot:(NSString *)bundleRoot
|
|
260
|
+
packagerHost:(NSString *)packagerHost
|
|
261
|
+
enableDev:(BOOL)enableDev
|
|
262
|
+
enableMinification:(BOOL)enableMinification
|
|
263
|
+
inlineSourceMap:(BOOL)inlineSourceMap
|
|
250
264
|
|
|
251
265
|
{
|
|
252
266
|
return [self jsBundleURLForBundleRoot:bundleRoot
|
|
@@ -254,6 +268,7 @@ static NSURL *serverRootWithHostPort(NSString *hostPort, NSString *scheme)
|
|
|
254
268
|
packagerScheme:nil
|
|
255
269
|
enableDev:enableDev
|
|
256
270
|
enableMinification:enableMinification
|
|
271
|
+
inlineSourceMap:inlineSourceMap
|
|
257
272
|
modulesOnly:NO
|
|
258
273
|
runModule:YES];
|
|
259
274
|
}
|
|
@@ -265,28 +280,45 @@ static NSURL *serverRootWithHostPort(NSString *hostPort, NSString *scheme)
|
|
|
265
280
|
enableMinification:(BOOL)enableMinification
|
|
266
281
|
modulesOnly:(BOOL)modulesOnly
|
|
267
282
|
runModule:(BOOL)runModule
|
|
283
|
+
{
|
|
284
|
+
return [self jsBundleURLForBundleRoot:bundleRoot
|
|
285
|
+
packagerHost:packagerHost
|
|
286
|
+
packagerScheme:nil
|
|
287
|
+
enableDev:enableDev
|
|
288
|
+
enableMinification:enableMinification
|
|
289
|
+
inlineSourceMap:NO
|
|
290
|
+
modulesOnly:modulesOnly
|
|
291
|
+
runModule:runModule];
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
+ (NSURL *)jsBundleURLForBundleRoot:(NSString *)bundleRoot
|
|
295
|
+
packagerHost:(NSString *)packagerHost
|
|
296
|
+
packagerScheme:(NSString *)scheme
|
|
297
|
+
enableDev:(BOOL)enableDev
|
|
298
|
+
enableMinification:(BOOL)enableMinification
|
|
299
|
+
inlineSourceMap:(BOOL)inlineSourceMap
|
|
300
|
+
modulesOnly:(BOOL)modulesOnly
|
|
301
|
+
runModule:(BOOL)runModule
|
|
268
302
|
{
|
|
269
303
|
NSString *path = [NSString stringWithFormat:@"/%@.bundle", bundleRoot];
|
|
304
|
+
BOOL lazy = enableDev;
|
|
305
|
+
NSArray<NSURLQueryItem *> *queryItems = @[
|
|
306
|
+
[[NSURLQueryItem alloc] initWithName:@"platform" value:kRCTPlatformName],
|
|
307
|
+
[[NSURLQueryItem alloc] initWithName:@"dev" value:enableDev ? @"true" : @"false"],
|
|
308
|
+
[[NSURLQueryItem alloc] initWithName:@"minify" value:enableMinification ? @"true" : @"false"],
|
|
309
|
+
[[NSURLQueryItem alloc] initWithName:@"inlineSourceMap" value:inlineSourceMap ? @"true" : @"false"],
|
|
310
|
+
[[NSURLQueryItem alloc] initWithName:@"modulesOnly" value:modulesOnly ? @"true" : @"false"],
|
|
311
|
+
[[NSURLQueryItem alloc] initWithName:@"runModule" value:runModule ? @"true" : @"false"],
|
|
270
312
|
#ifdef HERMES_BYTECODE_VERSION
|
|
271
|
-
|
|
272
|
-
#else
|
|
273
|
-
NSString *runtimeBytecodeVersion = @"";
|
|
313
|
+
[[NSURLQueryItem alloc] initWithName:@"runtimeBytecodeVersion" value:HERMES_BYTECODE_VERSION],
|
|
274
314
|
#endif
|
|
275
|
-
|
|
276
|
-
// When we support only iOS 8 and above, use queryItems for a better API.
|
|
277
|
-
NSString *query = [NSString stringWithFormat:@"platform=%@&dev=%@&minify=%@&modulesOnly=%@&runModule=%@%@",
|
|
278
|
-
kRCTPlatformName, // [macOS]
|
|
279
|
-
enableDev ? @"true" : @"false",
|
|
280
|
-
enableMinification ? @"true" : @"false",
|
|
281
|
-
modulesOnly ? @"true" : @"false",
|
|
282
|
-
runModule ? @"true" : @"false",
|
|
283
|
-
runtimeBytecodeVersion];
|
|
315
|
+
];
|
|
284
316
|
|
|
285
317
|
NSString *bundleID = [[NSBundle mainBundle] objectForInfoDictionaryKey:(NSString *)kCFBundleIdentifierKey];
|
|
286
318
|
if (bundleID) {
|
|
287
|
-
|
|
319
|
+
queryItems = [queryItems arrayByAddingObject:[[NSURLQueryItem alloc] initWithName:@"app" value:bundleID]];
|
|
288
320
|
}
|
|
289
|
-
return [[self class] resourceURLForResourcePath:path packagerHost:packagerHost scheme:scheme
|
|
321
|
+
return [[self class] resourceURLForResourcePath:path packagerHost:packagerHost scheme:scheme queryItems:queryItems];
|
|
290
322
|
}
|
|
291
323
|
|
|
292
324
|
+ (NSURL *)resourceURLForResourcePath:(NSString *)path
|
|
@@ -303,6 +335,20 @@ static NSURL *serverRootWithHostPort(NSString *hostPort, NSString *scheme)
|
|
|
303
335
|
return components.URL;
|
|
304
336
|
}
|
|
305
337
|
|
|
338
|
+
+ (NSURL *)resourceURLForResourcePath:(NSString *)path
|
|
339
|
+
packagerHost:(NSString *)packagerHost
|
|
340
|
+
scheme:(NSString *)scheme
|
|
341
|
+
queryItems:(NSArray<NSURLQueryItem *> *)queryItems
|
|
342
|
+
{
|
|
343
|
+
NSURLComponents *components = [NSURLComponents componentsWithURL:serverRootWithHostPort(packagerHost, scheme)
|
|
344
|
+
resolvingAgainstBaseURL:NO];
|
|
345
|
+
components.path = path;
|
|
346
|
+
if (queryItems != nil) {
|
|
347
|
+
components.queryItems = queryItems;
|
|
348
|
+
}
|
|
349
|
+
return components.URL;
|
|
350
|
+
}
|
|
351
|
+
|
|
306
352
|
- (void)updateValue:(id)object forKey:(NSString *)key
|
|
307
353
|
{
|
|
308
354
|
[[NSUserDefaults standardUserDefaults] setObject:object forKey:key];
|
|
@@ -320,6 +366,11 @@ static NSURL *serverRootWithHostPort(NSString *hostPort, NSString *scheme)
|
|
|
320
366
|
return [[NSUserDefaults standardUserDefaults] boolForKey:kRCTEnableMinificationKey];
|
|
321
367
|
}
|
|
322
368
|
|
|
369
|
+
- (BOOL)inlineSourceMap
|
|
370
|
+
{
|
|
371
|
+
return [[NSUserDefaults standardUserDefaults] boolForKey:kRCTInlineSourceMapKey];
|
|
372
|
+
}
|
|
373
|
+
|
|
323
374
|
- (NSString *)jsLocation
|
|
324
375
|
{
|
|
325
376
|
return [[NSUserDefaults standardUserDefaults] stringForKey:kRCTJsLocationKey];
|
|
@@ -349,6 +400,11 @@ static NSURL *serverRootWithHostPort(NSString *hostPort, NSString *scheme)
|
|
|
349
400
|
[self updateValue:@(enableMinification) forKey:kRCTEnableMinificationKey];
|
|
350
401
|
}
|
|
351
402
|
|
|
403
|
+
- (void)setInlineSourceMap:(BOOL)inlineSourceMap
|
|
404
|
+
{
|
|
405
|
+
[self updateValue:@(inlineSourceMap) forKey:kRCTInlineSourceMapKey];
|
|
406
|
+
}
|
|
407
|
+
|
|
352
408
|
- (void)setPackagerScheme:(NSString *)packagerScheme
|
|
353
409
|
{
|
|
354
410
|
[self updateValue:packagerScheme forKey:kRCTPackagerSchemeKey];
|
package/React/Base/RCTUIKit.h
CHANGED
|
@@ -589,7 +589,8 @@ typedef UIImageView RCTUIImageView;
|
|
|
589
589
|
#else
|
|
590
590
|
@interface RCTUIImageView : NSImageView
|
|
591
591
|
NS_ASSUME_NONNULL_BEGIN
|
|
592
|
-
|
|
592
|
+
// FUTURE: When Xcode 14 is no longer supported (CI is building with Xcode 15), we can remove this override since it's now declared on NSView
|
|
593
|
+
@property (assign) BOOL clipsToBounds;
|
|
593
594
|
@property (nonatomic, strong) RCTUIColor *tintColor;
|
|
594
595
|
@property (nonatomic, assign) UIViewContentMode contentMode;
|
|
595
596
|
NS_ASSUME_NONNULL_END
|
package/React/Base/RCTVersion.m
CHANGED
|
@@ -20,6 +20,7 @@ import android.content.pm.PackageManager;
|
|
|
20
20
|
import android.graphics.Color;
|
|
21
21
|
import android.graphics.Typeface;
|
|
22
22
|
import android.hardware.SensorManager;
|
|
23
|
+
import android.os.Build;
|
|
23
24
|
import android.util.Pair;
|
|
24
25
|
import android.view.Gravity;
|
|
25
26
|
import android.view.View;
|
|
@@ -1098,7 +1099,7 @@ public abstract class DevSupportManagerBase implements DevSupportManager {
|
|
|
1098
1099
|
if (!mIsReceiverRegistered) {
|
|
1099
1100
|
IntentFilter filter = new IntentFilter();
|
|
1100
1101
|
filter.addAction(getReloadAppAction(mApplicationContext));
|
|
1101
|
-
mApplicationContext
|
|
1102
|
+
compatRegisterReceiver(mApplicationContext, mReloadAppBroadcastReceiver, filter, true);
|
|
1102
1103
|
mIsReceiverRegistered = true;
|
|
1103
1104
|
}
|
|
1104
1105
|
|
|
@@ -1214,4 +1215,21 @@ public abstract class DevSupportManagerBase implements DevSupportManager {
|
|
|
1214
1215
|
|
|
1215
1216
|
return mSurfaceDelegateFactory.createSurfaceDelegate(moduleName);
|
|
1216
1217
|
}
|
|
1218
|
+
|
|
1219
|
+
/**
|
|
1220
|
+
* Starting with Android 14, apps and services that target Android 14 and use context-registered
|
|
1221
|
+
* receivers are required to specify a flag to indicate whether or not the receiver should be
|
|
1222
|
+
* exported to all other apps on the device: either RECEIVER_EXPORTED or RECEIVER_NOT_EXPORTED
|
|
1223
|
+
*
|
|
1224
|
+
* <p>https://developer.android.com/about/versions/14/behavior-changes-14#runtime-receivers-exported
|
|
1225
|
+
*/
|
|
1226
|
+
private void compatRegisterReceiver(
|
|
1227
|
+
Context context, BroadcastReceiver receiver, IntentFilter filter, boolean exported) {
|
|
1228
|
+
if (Build.VERSION.SDK_INT >= 34 && context.getApplicationInfo().targetSdkVersion >= 34) {
|
|
1229
|
+
context.registerReceiver(
|
|
1230
|
+
receiver, filter, exported ? Context.RECEIVER_EXPORTED : Context.RECEIVER_NOT_EXPORTED);
|
|
1231
|
+
} else {
|
|
1232
|
+
context.registerReceiver(receiver, filter);
|
|
1233
|
+
}
|
|
1234
|
+
}
|
|
1217
1235
|
}
|
|
@@ -300,6 +300,9 @@ class JSCRuntime : public jsi::Runtime {
|
|
|
300
300
|
#if __IPHONE_OS_VERSION_MIN_REQUIRED < __IPHONE_10_0
|
|
301
301
|
#define _JSC_NO_ARRAY_BUFFERS
|
|
302
302
|
#endif
|
|
303
|
+
#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 160400
|
|
304
|
+
#define _JSC_HAS_INSPECTABLE
|
|
305
|
+
#endif
|
|
303
306
|
#endif
|
|
304
307
|
#if defined(__MAC_OS_X_VERSION_MIN_REQUIRED)
|
|
305
308
|
#if __MAC_OS_X_VERSION_MIN_REQUIRED >= __MAC_10_11
|
|
@@ -396,6 +399,13 @@ JSCRuntime::JSCRuntime(JSGlobalContextRef ctx)
|
|
|
396
399
|
stringCounter_(0)
|
|
397
400
|
#endif
|
|
398
401
|
{
|
|
402
|
+
#ifndef NDEBUG
|
|
403
|
+
#ifdef _JSC_HAS_INSPECTABLE
|
|
404
|
+
if (__builtin_available(macOS 13.3, iOS 16.4, tvOS 16.4, *)) {
|
|
405
|
+
JSGlobalContextSetInspectable(ctx_, true);
|
|
406
|
+
}
|
|
407
|
+
#endif
|
|
408
|
+
#endif
|
|
399
409
|
}
|
|
400
410
|
|
|
401
411
|
JSCRuntime::~JSCRuntime() {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-macos",
|
|
3
|
-
"version": "0.71.
|
|
3
|
+
"version": "0.71.34",
|
|
4
4
|
"bin": "./cli.js",
|
|
5
5
|
"description": "React Native for macOS",
|
|
6
6
|
"license": "MIT",
|
|
@@ -106,7 +106,8 @@
|
|
|
106
106
|
"test-typescript": "dtslint types",
|
|
107
107
|
"test-typescript-offline": "dtslint --localTs node_modules/typescript/lib types",
|
|
108
108
|
"bump-all-updated-packages": "node ./scripts/monorepo/bump-all-updated-packages",
|
|
109
|
-
"align-package-versions": "node ./scripts/monorepo/align-package-versions.js"
|
|
109
|
+
"align-package-versions": "node ./scripts/monorepo/align-package-versions.js",
|
|
110
|
+
"trigger-react-native-release": "node ./scripts/trigger-react-native-release.js"
|
|
110
111
|
},
|
|
111
112
|
"peerDependencies": {
|
|
112
113
|
"react": "18.2.0"
|
|
@@ -116,7 +117,6 @@
|
|
|
116
117
|
"@react-native-community/cli": "10.2.4",
|
|
117
118
|
"@react-native-community/cli-platform-android": "10.2.0",
|
|
118
119
|
"@react-native-community/cli-platform-ios": "10.2.4",
|
|
119
|
-
"@react-native-community/cli-tools": "10.1.1",
|
|
120
120
|
"@react-native/assets": "1.0.0",
|
|
121
121
|
"@react-native/normalize-color": "2.1.0",
|
|
122
122
|
"@react-native/polyfills": "2.0.0",
|