diff --git a/Libraries/Utilities/HMRClient.js b/Libraries/Utilities/HMRClient.js index 08c0f4e432eb44..a86f6c94038caf 100644 --- a/Libraries/Utilities/HMRClient.js +++ b/Libraries/Utilities/HMRClient.js @@ -281,7 +281,8 @@ function registerBundleEntryPoints(client) { function dismissRedbox() { if ( - Platform.OS === 'ios' && + (Platform.OS === 'ios' || + Platform.OS === 'macos') /* TODO(macOS ISS#2323203) */ && NativeRedBox != null && NativeRedBox.dismiss != null ) { diff --git a/React/Base/RCTConvert.h b/React/Base/RCTConvert.h index 80001a94a7a4d7..c8ada90b6be305 100644 --- a/React/Base/RCTConvert.h +++ b/React/Base/RCTConvert.h @@ -101,6 +101,7 @@ typedef NSURL RCTFileURL; + (CGAffineTransform)CGAffineTransform:(id)json; + (RCTUIColor *)UIColor:(id)json; // TODO(OSS Candidate ISS#2710739) ++ (RCTUIColor *)NSColor:(id)json; // TODO(OSS Candidate ISS#2710739) + (CGColorRef)CGColor:(id)json CF_RETURNS_NOT_RETAINED; + (YGValue)YGValue:(id)json; diff --git a/React/Base/RCTConvert.m b/React/Base/RCTConvert.m index fe4f7689976fa7..b111ac512ed674 100644 --- a/React/Base/RCTConvert.m +++ b/React/Base/RCTConvert.m @@ -808,6 +808,11 @@ + (type)type:(id)json \ } return names; } + ++ (RCTUIColor *)NSColor:(id)json +{ + return [RCTConvert UIColor:json]; +} // ]TODO(macOS ISS#2323203) + (RCTUIColor *)UIColor:(id)json // TODO(OSS Candidate ISS#2710739) diff --git a/React/CxxBridge/RCTCxxBridge.mm b/React/CxxBridge/RCTCxxBridge.mm index 6b912e8d78f043..48b1c970ac6788 100644 --- a/React/CxxBridge/RCTCxxBridge.mm +++ b/React/CxxBridge/RCTCxxBridge.mm @@ -26,6 +26,7 @@ #import #import #import +#import // TODO(macOS ISS#2323203) #import #import #import @@ -929,7 +930,7 @@ - (void)executeSourceCode:(NSData *)sourceCode sync:(BOOL)sync BOOL isHotLoadingEnabled = devSettings.isHotLoadingEnabled; [self enqueueJSCall:@"HMRClient" method:@"setup" - args:@[@"ios", path, host, RCTNullIfNil(port), @(isHotLoadingEnabled)] + args:@[kRCTPlatformName, path, host, RCTNullIfNil(port), @(isHotLoadingEnabled)] // TODO(macOS ISS#2323203) completion:NULL]; } #endif diff --git a/React/DevSupport/RCTPackagerConnection.mm b/React/DevSupport/RCTPackagerConnection.mm index 3fb6714f756c79..3f9ba5e9c3e04d 100644 --- a/React/DevSupport/RCTPackagerConnection.mm +++ b/React/DevSupport/RCTPackagerConnection.mm @@ -87,7 +87,7 @@ - (instancetype)init components.scheme = @"http"; components.port = @(kRCTBundleURLProviderDefaultPort); components.path = @"/message"; - components.queryItems = @[[NSURLQueryItem queryItemWithName:@"role" value:@"ios"]]; + components.queryItems = @[[NSURLQueryItem queryItemWithName:@"role" value:kRCTPlatformName]]; // TODO(macOS ISS#2323203) static dispatch_queue_t queue; static dispatch_once_t onceToken; dispatch_once(&onceToken, ^{