How do I write universal swift code for both iOS and OS X. In cocoa I could use #ifdef, what do I do now?
Use:
#if os(OSX)
import Cocoa
#elseif os(iOS)
import UIKit
#endif
Use:
#if os(OSX)
import Cocoa
#elseif os(iOS)
import UIKit
#endif