How to remove dark mode from Comet iOS screens?

Hi guys,

I wanted to override the system dark mode and just use white background across comet screens.
Understandably, I followed this: https://stackoverflow.com/questions/56537855/is-it-possible-to-opt-out-of-dark-mode-on-ios-13

but the comet UI screens still have the black background in iOS 13 and above.
How can we easily opt out of dark mode without changing the color of every view?

Hello,

Using the first approach mentioned in the link you’ll be able to switch to light mode. This mode will be applicable to whole app.

1 Like

Thanks, @pushpsen.airekar, I’ve been using the first approach since the beginning. All but the comet screens were in light mode.
I tried the second approach inside the CometChatUnified.swift setup function and it worked(hope this helps others):

if #available(iOS 13.0, *) {
                self.overrideUserInterfaceStyle = .light
            } else {
                // Fallback on earlier versions
            }
1 Like