No such module 'UIKit'
if you already selected iOS while creating Playground file but still getting error No such module 'UIKit', then follow following steps. Xcode 13
enter image description here
UIKit is for mobile apps, not MacOS apps. You want AppKit.