Thanks for being a part of WWDC25!

How did we do? We’d love to know your thoughts on this year’s conference. Take the survey here

Xcode26.0 beta has a compilation error

The swift syntax compilation reported an error.

as follows

How should I be compatible

Answered by DTS Engineer in 842669022

@jiehaowu, the UILabel initializer does not return an optional. If you create a brand new Xcode project from File > New > Project, do you continue to see this? (I just tried that, and I don't.) If not, that means there's something else in your project that is creating this initializer, potentially from a library that you are importing.

— Ed Ford,  DTS Engineer

I tested both in Xcode 16.4 and 26ß.

No error, except for line 69, I had to change to:

        label.textColor = UIColor(named: "#666666")

Could you post the code where you use songNameLabel or artistName ?

Accepted Answer

@jiehaowu, the UILabel initializer does not return an optional. If you create a brand new Xcode project from File > New > Project, do you continue to see this? (I just tried that, and I don't.) If not, that means there's something else in your project that is creating this initializer, potentially from a library that you are importing.

— Ed Ford,  DTS Engineer

Xcode26.0 beta has a compilation error
 
 
Q