Skip to content
This repository was archived by the owner on Aug 31, 2021. It is now read-only.

Commit f0e36a9

Browse files
committed
[[ Bug 22606 ]] Support opting out of iOS dark mode
This patch adds support for using the `UIUserInterfaceStyle` plist entry to opt out of dark mode support. This is required for apps compiled against iOS 13.0 and up if they do not support dark mode as the system automatically opts in.
1 parent f670ed5 commit f0e36a9

File tree

4 files changed

+10
-1
lines changed

4 files changed

+10
-1
lines changed

docs/notes/bugfix-22606.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Add support for opting out of iOS dark mode

engine/rsrc/mobile-device-template.plist

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,5 +134,6 @@
134134
<array>
135135
${APP_URL_WHITELIST}
136136
</array>
137+
${UI_STYLE}
137138
</dict>
138139
</plist>

engine/rsrc/mobile-template.plist

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,5 +95,6 @@
9595
<key>NSPhotoLibraryAddUsageDescription</key>
9696
<string>This application requires access to Photo Library</string>
9797
${HEALTHKIT}
98+
${UI_STYLE}
9899
</dict>
99100
</plist>

ide-support/revsaveasiosstandalone.livecodescript

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1550,7 +1550,12 @@ private command revCreateMobilePlist pSettings, pAppBundle, pTarget, pFonts, pPl
15501550
revStandaloneAddWarning "No iPad supported intial orientation. Assuming Portrait."
15511551
put "Portrait" into tIPadOrientations
15521552
end if
1553-
end if
1553+
end if
1554+
1555+
local tUIStyle
1556+
if not pSettings["ios,supports dark mode"] then
1557+
put "<key>UIUserInterfaceStyle</key><string>Light</string>" into tUIStyle
1558+
end if
15541559

15551560
-- MM-2011-09-28: Make sure portrait and landscape iPad splashes are present if required.
15561561
--
@@ -1620,6 +1625,7 @@ private command revCreateMobilePlist pSettings, pAppBundle, pTarget, pFonts, pPl
16201625
replace "${CUSTOM_FONTS}" with tCustomFonts in pPlist
16211626
replace "${DISABLE_ATS}" with tDisableATS in pPlist
16221627
replace "${HEALTHKIT}" with tHealthKit in pPlist
1628+
replace "${UI_STYLE}" with tUIStyle in pPlist
16231629

16241630
-- PM-2018-01-15: [[Bug 20852]] Get info about Xcode/SDK versions
16251631
if pTarget is "Device" then

0 commit comments

Comments
 (0)