XCode colors desaturating when compiled into Simulator - xcode

The colors in my ViewControllers are all desaturating when I compile into the simulator. The same desaturation occurs when viewed on my iPhone. Within XCode itself, the colors appear fine, it's just compilation that appears to be the problem. I've been looking high and low for color settings but no luck. Has anyone run into this?

It looks like this was a bug in Xcode 7 Beta. I just upgraded and the issue was fixed.

Related

Xcode 14.1 Black square on live preview

I've installed the new version of Xcode (14.1, build 14B47b) and I'm having issues with the canvas live preview. When "Live" is selected I only see a black square, but if I select "Selectable", I can see a preview of my view.
Is anyone else experiencing something like this? Did I miss something in my setup?
Thanks for your help!
I just started seeing the same issue on 14.1. Tried restarting Xcode and turning the canvas off/on, but neither worked. However, I switch target device (to a different simulator) and it rendered correctly.

Xcode 12.3 iOS 14.3 simulators Yellow Dock / yellow translucent issues

Today I downloaded the release of Xcode 12.3, and I went running the iOS 14.3 simulators and it seems like there is a graphic glitch that all translucent views are yellow, dock included.
I redownloaded iOS 14.2 and those seem fine. It just seems really odd. I've submitted feedback, but I was curious if anyone else has seen this?
I'm on macOS v10.15.7 (Catalina) and am curious of if it's just Catalina or also macOS v11 (Big Sur).
Xcode 12.4 RC has announced fix.
iOS simulated devices no longer display an incorrect yellow tint in translucent UI elements. Certain GPUs may continue to display the tint with some tvOS simulators. (71203015)
I think it is a bug related to the discrete GPU.
In addition, this bug causes the background of the on-screen keyboard to be almost RGB(0,0,0). Experienced on MBP 2017 with Catalina.
Workaround I - Using integrated GPU
In the simulator, set menu File → GPU Selection → Prefer Integrated GPU to work around this bug.
Restart the simulator.
This was tested on a MacBook Pro with Catalina and Big Sur. As comments suggest that it won't work on iMac.
Workaround II - Reduce transparency
In the simulated device (e.g. iPhone), Settings → Accessibility → Display & Text Size → turn on Reduce Transparency.
Notice that it can only reduce the previous 'solid' yellow to 'fairly light'.
I find this workaround, as the discrete GPU can be used, is more suitable for testing the UI logic than the previous solution.
This was tested on a MacBook Pro with Catalina. Might work on iMac.
Are you using a MacBook Pro? I had the same bug.
I solved in the following ways.
Step 1: Unplug all cables, including the charging cable
Step 2: Restart the iOS simulator
Best way around it (what I've done), is to download the 14.2 Simulator pack from within Xcode.
Open Xcode->Preferences
Tap Components
Tap the 14.2 Simulator pack and Xcode is going to start installing it.
It's a workaround till they fix that miserable error.
It is Xcode 12.3 bug! you can see that sometimes in the code interface builder too:
It is not critical but If you really care about it, download and use the previous Xcode from here
Nothe that you can't build for iOS 14.3 if you choose to use Xcode 12.2.
More description
Xcode always have unknown issues at the release point. Some of them are critical like this with 54K views! and some are not like this issue with about 5K views in only 13 days.
My suggestion is to always have 2 Xcodes at the same time until you are sure about Xcode bugs!
Happened to me as well, while I was charging my MacBook Pro 2016. I closed my Xcode, disconnected my charger from the Macbook and run it again. The problem was fixed.
One thing to point out/confirm: Seems the issue is limited to the simulator. The issue does not persist when sideloading the project to iPhone.

Dark mode does not switch to a Dark mode background in Xcode

I have set up different backgrounds for 'Light/Dark Appearance'
But when switching between Light/Dark mode within Xcode, my background always uses image from 'Any/Light Appearance'. Only colours set for icons changes accordingly.
FYI: I'm switching between Light/Dark mode using Interface Style option.
Can someone please advice what I'm missing on? It's all new to me.
I think it is an Xcode bug. You can confirm it by changing your setting in the iOS Simulator.
Go to Settings -> Developer -> Dark Appearance
I think you might need to uncheck the Resizing checkbox and set the Scales property to Single Scale. It worked for me.
Set your image to Render As Original Image
I think it's an Xcode (latest version) bug.
If you run it on your phone, you won't have this problem. Meaning settings are correct.
In Simulator it's working fine. One can confirm by toggling the Appearance from feature menu of the simulator.
This seems like an Xcode bug, but when you try to run it on your simulator or physical device, it should work perfectly assuming you are in Dark Mode.
By unchecking the Preserve Vector Data option 1, one can see the change in the background when switching between the modes from interface styles 2.
But I noticed that if you leave the option selected and test it on the simulator, it works perfectly fine there. Hence I feel it's an Xcode bug too.
The Xcode Bug is still here, Xcode storyboard appearance switcher does not work, it only works in the simulator.
You can change the simulator device appearance:
Settings> Developer> Dark Appearance.
Happy coding.
On my physical device iPhone 8 iOS 14.6 dark Mode doesn't work. traitCollectionDidChange not get called after switching to dark mode.
On my iPhone 12 iOS 15.x, and some testers it works.
No Solution i tried worked. Also i got some other weird UI bugs aswell on my iPhone 8.
Hope its just an Xcode Bug.

Interface Builder appears blurry on retina display in Xcode 6.3

I just recently downloaded the latest public release of Xcode (6.3) and I noticed the storyboard for my app is now low res on my Retina MacBook Pro. Images, text and standard UI elements all appear blurry. On the actual device everything looks fine and code still looks sharp its just while working in the Interface Builder.
Has anybody else noticed this and figured out a way to fix it? This is happening to me in both Swift and Objective-C projects including in Apple's sample projects (Master-Detail Application and etc).
I submitted this as a bug report, and Apple responded by saying that it is the desired appearance. They did not give an explanation, that was all they said.
It appears to be related to a bug in the newest iOS SDK, and as a workaround, they've forced Interface Builder to render everything at 1x. Currently, there doesn't seem to be any solution to this annoying problem other than to wait.
Just installed Xcode version 6.3.2 and this issue appears to have been fixed.
Have you tried re-installation of the same version? That helped once.
Alternatively, can upgrade to newer version, too.

iOS Simulator drawing too big (not a window scale issue)

Firstly, thanks for your time and effort.
Just today I started having a random issue in my iOS simulator running an app from Xcode 6. No Xcode update has been installed since I last used the simulator so I don't think it is an issue with an update.
Basically, my simulator is drawing everything HUGE. Like 4x the size it should be. This happens with all simulator devices regardless of iOS version. I'm aware of the window scaling with CMD + 1, 2, 3. That is not the issue. It shows the same no matter the scale. When you click or interact with the screen squares of it flicker. This is what it looks like.
Note that it is not just the application, but also the home screen.
I should also note that this does not seem to be just the simulator. The screen saver on OSX with the words and definitions also is entirely too large. I haven't noticed it in any other application though.
I have done everything I could think of to debug the issue.
I deleted Xcode and reinstalled it with a restart in between.
I have created a new user account on my machine and ran a boilerplate app on the simulator and it displayed the same way.
I've changed my screen resolution to see if that resolves the issue.
I cleared the mysterious PRAM.
None of these solved the issue or made it better or worse.
Again, thanks for your time. It is appreciated.
For me pressing command + 2 or command + 3 when the ios simulator opens up solve the problem. Pressing the above keys do scaled down the simulator size.
Bug in 10.10.2 beta:
https://devforums.apple.com/thread/243676
https://devforums.apple.com/thread/254997
iOS simulator scaled bug
iOS 8 and Xcode 6 Simulator Display Out of Alignment
iOS Simulator display scaled incorrectly
I recently started and I had the same issue. You simply have to change the scale. When the iOS Simulator opens, navigate to Window and change the scale; 50% worked for me.
I changed to 14C94b, fixed this bug.
I have been to see same problem for Subline Text3
enjoy)

Resources