Xcode Playground错误:没有此类模块'UIKit'(或'AppKit')
今天在我的MacBook Pro上创建新的Xcode playground时,得到了最奇怪的错误消息:“没有这样的模块'UIKit'”。

控制台也显示错误:
如果您创建了一个针对iOS的playground,并显示“没有此类模块'UIKit'”错误消息,请打开“ 实用程序”面板,然后将“ 平台”切换到iOS。如果您创建了一个针对macOS的运动场,并显示“没有此类模块'AppKit'”错误消息,请显示“ 实用程序”面板,并将Platform切换至macOS。

控制台也显示错误:
Playground execution failed:
error: Linked List.playground:3:8: error: no such module 'UIKit'
import UIKit
^

如果您创建了一个针对iOS的playground,并显示“没有此类模块'UIKit'”错误消息,请打开“ 实用程序”面板,然后将“ 平台”切换到iOS。如果您创建了一个针对macOS的运动场,并显示“没有此类模块'AppKit'”错误消息,请显示“ 实用程序”面板,并将Platform切换至macOS。
上一篇:RESTful架构设计指南