if print is not called, that means the crash is not there - that's the weird bit: The app doesn't crash. When I start it in the SE2 13.5 simulator, everything's working fine, the colors are set properly, including when I switch to the dark theme and the print is written to console with the proper color (not nil). But the whole time the error is listed in the Issue Navigator and there's also the small, red circle with the white x in the bar of the open files (in the part of Xcode that can display the storyboard or code). When I click on the error in the Issue Navigator, the storyboard opens with the affected ViewController selected. When I just did that, Xcode did some loading and all of the sudden the error didn't show up for VC3 anymore but instead VC1 (yesterday it listed up to 3 VCs). When I click on the error, it doesn't jump to the affected UI item though, I have to find that myself and there's also no red circle next to the UI item or the VC (as it usually would be if there's a storyboard error). In the Attributes Inspector of that UI item you can see this: https://i.imgur.com/ZZfhd35.png - Clicking on "Debug" opens an iPhone 13 Pro simulator (didn't notice that until now) and then the app crashes on it with EXC_BAD_INSTRUCTION for that line. The weirdness doesn't stop there: If I select the iPhone 13 Pro simulator manually and start the app, everything's fine, no crash and the colors are set properly, even with force unwrapping. No idea what's going on here.
Topic:
Programming Languages
SubTopic:
Swift
Tags: