Xcode12: Colours defined in a xcassets file in a Swift Local Package does not show Dark Appearance when applying them via IB Storyboard

547 views Asked by At

From the Swift tools version of 5.3 on and, we can bundle our resources within the Swift package. Following that, I included an xcassets catalog with my colors in a helper UI Local Package. When accessing them programmatically from my main target with

init?(named name: String, 
   in bundle: Bundle?, 
compatibleWith traitCollection: UITraitCollection?)

it works fine. However, when running in Dark Mode and applying the colors via IB Storyboard, it always shows the one for Any Appearance instead of the one set for Dark Appearance, even if both are discoverable and visible from IB. I am using // swift-tools-version:5.3 and Xcode Version 12.1 (12A7403)

0

There are 0 answers