No such module Cocoa

No such module Cocoa error message is displayed when you type of the playground file selected is iOS instead of OS X. Make sure to select Playground under OS X if you want to use Cocoa framework and go for UIKit incase of iOS

Choose a template from your new file

Another alternate way to change the template is to use the Playground Settings. Use the toggle option to show the Utilities.

Show the Utilities on Playground

Navigate to Playground Settings section, click the Platform drop down and select OS X from the list. This should also resolve the No such module error on Playground.

Playground Settings

In Category: Develop, Programming, Xcode

Ravi Shankar

A polyglot software developer and now exploring Swift and iOS development. If you would like to learn from me then check out services page.

Show 0 Comments
No comments yet. Be the first.

Leave a Comment