Skip to content

Commit

Permalink
Fix method signature
Browse files Browse the repository at this point in the history
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 fe5ac2c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion React/CoreModules/RCTDevLoadingView.mm
Original file line number Diff line number Diff line change
Expand Up @@ -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]];
}
Expand Down

0 comments on commit fe5ac2c

Please sign in to comment.