Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode 9.2 stops compiling for < 11.0 target when using named colors

Tags:

xcode

ios

I know that named colors are supported from 11.0 but our project targets iOS 9.0 and we were able to successfully compile it using Xcode 9.0 / 9.1 because named colors were used only in storyboard and not in runtime.

After switching to Xcode 9.2 the project does not compile:

named colors do not work prior to iOS 11.0

like image 972
Arnie Schwarzvogel Avatar asked Dec 16 '17 12:12

Arnie Schwarzvogel


1 Answers

enter image description here

//Please right click on Storyboard

enter image description here

//Alt+CMD+f

enter image description here

enter image description here

Now ctrl+F and paste .

color key=(.*) name=.* 

and now replace find source with this line

<color key=$1 red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>

//MARK:- OR Paste your key in key

(<color key="your key")

build and run

like image 110
Shakeel Ahmed Avatar answered Oct 25 '22 07:10

Shakeel Ahmed