Preserve Vector Data not working for Dark Appearance

Hi,


I have a chess app and am moving the chess board from the traditional @1x, @2x and @3x bitmap images to a single vector that can scale nicely on both iOS and macOS. I've replaced the old images with my vector artwork, one for Any appearance and one for Dark. After checking the Preserve Vector Data checkbox I can see that the image on macOS is scaling nicely as I scale the window size.


The issue is that when I change to dark mode it doesn't change the the image to the dark appearance variant, it stays as the light one. If I uncheck the Preserve Vector Data check box the image does indeed change to the correct dark appearance, but it is no longer scaled nicely. This same behaviour also occurs in Xcode 11 beta on both macOS Catalina and iOS 13.


Am I missing something here or is this an Xcode bug?


Thanks,

Nick

Replies

There could effectively be a bug.


Think this provides a solution (taht was not related to dark mode, but could well be the same root cause), by setting the image programmatically.

https://stackoverflow.com/questions/45622894/xcode-9-asset-catalog-preserves-vector-data-not-working

Hi, thanks for passing that over, I gave it go but unfortunately didn't fix the issue.


I've submitted a bug to Apple.