Reputation: 1052
I force my application to be in Light mode by setting User Interface Style = Light
in plist
file.
However, it seems only works when i run app in debug mode (plug the cable and run). When i archive ipa and distribute to TestFlight, it doesnt work. Anyone has the same issues?
Note that status bar, actionsheet, alertview are affected controls.
Any help will be much appreciated. Thanks.
Upvotes: 0
Views: 1136
Reputation: 371
You need to set this in Appdelegate
. I am using this in all my apps and it's working.
if #available(iOS 13.0, *) {
window?.overrideUserInterfaceStyle = .light
}
For iOS 13 and above add this in SceneDelegate.
@available(iOS 13.0, *)
func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) {
window?.overrideUserInterfaceStyle = .light
}
Upvotes: 1