Adam Jenkins
Adam Jenkins

Reputation: 55792

XCode 13 SortOrder is ambiguous

Check out this error in the most recently updated Xcode (13):

enter image description here

Did Apple screw something up? How do I fix this? I can see when I start typing SortOrder it shows a Protocol and an Enum.

Upvotes: 0

Views: 163

Answers (1)

George
George

Reputation: 30461

Because of the conflicting SortOrder enum and protocol, it's ambiguous to the compiler which one you want to use.

Because the SortOrder enum is part of the Foundation framework, you can do the following to explicitly use it:

Foundation.SortOrder

Example usage:

Foundation.SortOrder.forward

Or in your case, you needed SortOrder from CouchbaseLiteSwift:

CouchbaseLiteSwift.SortOrder

Upvotes: 2

Related Questions