The colors of the texts are in white instead of black in my application for some Iphone #172906
-
BodyHi, I've an application developed with Xcode/swift5. When I test on several simulators the result is good. I've also test on my Iphone in Xcode, the result is good, all text are black. Now the application is in production. Unfortunately for somes users the result is'nt good, all text are white. I do'nt understand why. is there a solution to solve this problem. In attach files i put some screen and the info.plist Guidelines
|
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 2 replies
-
I'm not sure if I'm getting it correctly but I'll still post it here, Likely Cause This almost certainly has to do with iOS Dark Mode.
Possible Fixes
|
Beta Was this translation helpful? Give feedback.
-
Hi Geo, It sounds like the issue is related to Dark Mode on iOS. When testing on simulators and your own iPhone, you might have only tested in Light Mode, so all text appeared black. On production devices, if the user has Dark Mode enabled, text colors that were hardcoded or not explicitly set can appear white, especially if using system colors like A few suggestions to fix this:
Most likely, setting adaptive colors or explicitly specifying colors for Dark Mode will solve the problem. Reference: |
Beta Was this translation helpful? Give feedback.
-
Hi Geo 👋 The issue you’re describing is almost certainly related to iOS Dark Mode. Why this happens
Solutions✅ Preferred: Use semantic system colorsInstead of hardcoding myLabel.textColor = .label // adapts automatically
myView.backgroundColor = .systemBackground This ensures text and background always adapt correctly in both Light and Dark modes. 🚫 If you don’t support Dark Mode yetYou can force the app to always use Light Mode by adding this to your Info.plist: <key>UIUserInterfaceStyle</key>
<string>Light</string> 🔍 Double-check custom backgroundsIf you’ve hardcoded a white background but left text as
What to do now
📚 Reference: Apple docs on UIColor This should resolve the white text issue your users are seeing. 👍 |
Beta Was this translation helpful? Give feedback.
-
Hi, |
Beta Was this translation helpful? Give feedback.
Hi Geo 👋
The issue you’re describing is almost certainly related to iOS Dark Mode.
Why this happens
Solutions
✅ Preferred: Use semantic system colors
Instead of hardcoding
.black
or.white
, use adaptive colors like.label
or.systemBackground
: