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)
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.
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.
Replace
import Cocoa
With:
import UIKit
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With