In my case I am using UI_USER_INTERFACE_IDIOM() that causes Xcode 13.3 with Swift 5.6 to fail. My fix is to replace UI_USER_INTERFACE_IDIOM() into UIDevice.current.userInterfaceIdiom.
Topic:
Developer Tools & Services
SubTopic:
Xcode
Tags: