From fe5ac2c3f9e47cfb7c5820a755a5d74d47624953 Mon Sep 17 00:00:00 2001 From: Ramanpreet Nara Date: Fri, 6 Mar 2020 12:30:03 -0800 Subject: [PATCH] Fix method signature Summary: All `NSNumber *` arguments of NativeModules need to be marked with `__nonnull`. Otherwise, when TurboModules are disabled, we run into a RedBox. Changelog: [iOS][Fixed] - Fix RCTDevLoadingView RedBox on Reload Reviewed By: PeteTheHeat Differential Revision: D20292188 fbshipit-source-id: a8a5d0b2070575d7728b6308b129196242671fe6 --- React/CoreModules/RCTDevLoadingView.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/React/CoreModules/RCTDevLoadingView.mm b/React/CoreModules/RCTDevLoadingView.mm index fdfee9176e1696..b159dfa93b7acd 100644 --- a/React/CoreModules/RCTDevLoadingView.mm +++ b/React/CoreModules/RCTDevLoadingView.mm @@ -113,7 +113,7 @@ -(void)showMessage:(NSString *)message color:(UIColor *)color backgroundColor:(U }); } -RCT_EXPORT_METHOD(showMessage:(NSString *)message withColor:(NSNumber *)color withBackgroundColor:(NSNumber *)backgroundColor) +RCT_EXPORT_METHOD(showMessage:(NSString *)message withColor:(NSNumber * __nonnull)color withBackgroundColor:(NSNumber * __nonnull)backgroundColor) { [self showMessage:message color:[RCTConvert UIColor:color] backgroundColor:[RCTConvert UIColor:backgroundColor]]; }