Why doesn't creating a new cocoa class import cocoa?

| | August 4, 2015

When I create a new Cocoa class in Xcode 6 why doesn’t it import Cocoa since it’s called “Cocoa class”? I know Cocoa uses Foundation but there are also things in Cocoa which are not in Foundation such as NSTableView and others. Thanks.

One Response to “Why doesn't creating a new cocoa class import cocoa?”

  1. Cocoa is only available to Mac OS X (desktop) applications. UIKit is only available to iOS applications. You cannot mix and match the two, as there is no system that has both. (You may be able to get some applications to use both in the Simulator, but they will fail to build for the actual device.)

    iOS does not expose the file system to the user, so there is no equivalent to NSOpenPanel available. You will need to choose a different approach to whatever it is you’re doing.

Leave a Reply