SF Symbols palette colors not rendering when used in drawRect (beta 5)

The new SF Symbols palette color feature was working perfectly for me in beta 4, but as soon as I installed beta 5 all my symbols started rendering in a single color. After some debugging, I realized that this is only happening when the image is created via drawRect.

Hopefully this is just a minor bug that will be fixed in the next beta, as I just spent an entire week moving everything over to custom symbols (and I have to render them via drawRect)...

Filed as FB9484119 with a sample project showing the issue.

I have similar problem with colors, but in my case it's not working at all also in beta 4... 685285

Very strange that this works just fine when adding the image to a UIImageView, but using the exact same image in drawRect does not. Using hierarchical or multicolor symbols in drawRect works as well, just not the palette images.

SF Symbols palette colors not rendering when used in drawRect (beta 5)
 
 
Q