Swift学习笔记(一):No such module 'Cocoa'

在xcode中创建一个Playground文件,

进行导包操作 ,import Cocoa 却提示No such module 'Cocoa'

原因是该Playground文件的platform 设置成了iOS,改为OS X 即可

如果进行导包操作 ,import UIKit 却提示No such module 'UIKit'

则原因相反,改为iOS即可

打开File Inspector,如下图设置

 
 
原文地址:https://www.cnblogs.com/hsx514/p/4861964.html