Skip to content
Permalink
Browse files
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
  • Loading branch information
RSNara authored and facebook-github-bot committed Mar 6, 2020
1 parent 83c76c2 commit fe5ac2c3f9e47cfb7c5820a755a5d74d47624953
Showing 1 changed file with 1 addition and 1 deletion.
@@ -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]];
}

0 comments on commit fe5ac2c

Please sign in to comment.