What happens if you ignore the warning ?
It's flagged at the error level so I can't even build the project.
What happens if you import Foundation at top of the file ?
Yup, this works. So having the "auto import" when doing Ctrl+Space on UUID would be ideal.
Which version of Xcode ? If you use Xcode 26 (with Swift 6.1), you should check in your build settings the MemberImportVisibility flag.
I was on Swift 5 but I just updated my build to use Swift 6, and I validated that MemberImportVisibility is set to Yes in the build settings (though I do still get the same build error if I set it to No).
What I'm gathering from this is that the import is definitely required—so my question would then be: Is there an easier way to get these imports to get automatically added when I select a type using Ctrl+Space?
Topic:
Developer Tools & Services
SubTopic:
Xcode
Tags: