Reputation: 13567
While I was working with the Xcode Playground I realized sometimes I have to import Foundation although I already imported Cocoa. Without it functions like sin, cos or lowercaseString refuse to work. As I noticed this morning NSCharacterSet is also not available.
Why it this so? Doesn't the Cocoa Framework already include the Foundation Framework?
At least this is what I learned during Objective-C development.
My Xcode is Version 6.1 (6A1052d)
import Cocoa
import Foundation // Does not work without this line
var resultSin = sin(M_PI)
Upvotes: 0
Views: 471