Skip to content

Commit

Permalink
Fix iOS 12 crash (#1688)
Browse files Browse the repository at this point in the history
  • Loading branch information
christianbaroni committed Feb 5, 2021
1 parent 690f489 commit 7808977
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ios/ThemeModule.m
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ + (BOOL)requiresMainQueueSetup
RCT_EXPORT_MODULE()

RCT_EXPORT_METHOD(setMode:(NSString *)mode) {
if (@available(iOS 12.0, *)) {
if (@available(iOS 13.0, *)) {
((AppDelegate*) UIApplication.sharedApplication.delegate).window.overrideUserInterfaceStyle =
[mode isEqualToString:@"dark"] ? UIUserInterfaceStyleDark : UIUserInterfaceStyleLight;
}
Expand Down

0 comments on commit 7808977

Please sign in to comment.