The fact that the UIKit module (which is part of the SDK and thus should always be available) couldn't be imported indicates that there is likely an earlier error that's the root cause for this. Could you run the failing expression followed by (lldb) swift-health-check and create a FB with the result?
Topic:
Developer Tools & Services
SubTopic:
Xcode
Tags: