react-nativeios13ios-darkmode

How to force disable iOS dark mode in React Native


The new iOS 13 update introduces an optional system-wide. This causes e.g. the StatusBar to have light text, which might become unreadable on a white background. It also breaks the iOS Datetime Picker (see DatePickerIOS or react-native-modal-datetime-picker)


Solution

  • The solution is to either

    1. add this to your Info.plist file:
        <key>UIUserInterfaceStyle</key>
        <string>Light</string>
    

    OR

    1. Add this to your AppDelegate.m:
        if (@available(iOS 13.0, *)) {
            rootView.overrideUserInterfaceStyle = UIUserInterfaceStyleLight;
        }