Disable Dark Mode in 2021r3.1

Any way to disable Dark Mode universally in the App with code?

I don’t know if you can do Info.plist things with Xojo iOS, but it’s apparently an Info.plist key:

<key>UIUserInterfaceStyle</key>
<string>Light</string>
1 Like

Thanks Tim. I’ll look into that. I had to modify the plist.info a while back for camera permissions. If I can just remember how to do it now.

That Worked Tim although it was a little confusing. I altered the plist.info after opening it with Xcode and added the key. Every time I saved the plist UIUserInterfaceStyle would change to “Appearance”. so I finally just tried it and it worked. Thanks for the tip. My App now disables dark mode only for itself.

I am really surprised that this doesn’t break the code signature.

I was surprised it worked too Tim

<key>UIUserInterfaceStyle</key>
<string>Light</string>

automatically changes to

<key>Appearance</key>
<string>Light</string>

when you enter it using xCode. I didn’t try it with an XML editor.