Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode 6 Beta: No such module 'Cocoa'

Tags:

xcode

swift

I'm trying to use the standard Cocoa library in a swift file in Xcode 6 Beta. I followed this instructions but when I import the library

import Cocoa 

XCode complains with the error

No such module 'Cocoa' 

I also tried with the REPL and I have no problems at all. I suppose it's a bug, cause I started different projects and only sometimes I get this error. Any suggestions? I'm using Mavericks (10.9.3)

like image 252
Griffosx Avatar asked Jun 08 '14 20:06

Griffosx


People also ask

How do I fix no such modules in Xcode?

Make sure that iOS Deployment Target is set same for all modules with main app. For example is TriviaApp s deployment target is set to 9.0 , Social s deployment target also need to be set to 9.0 . Make sure your main module ( TriviaApp ) and your used framework ( Social ) have same set of configurations.

What is cocoa in Swift?

Cocoa is a set of object-oriented frameworks that provides a runtime environment for applications running in OS X and iOS. Cocoa is the preeminent application environment for OS X and the only application environment for iOS.


1 Answers

Replace

import Cocoa 

With:

import UIKit 
like image 168
Robert Avatar answered Oct 02 '22 14:10

Robert