Hello guys, so I wanted to create one file with one class and share the code in both iOS and OS X app. The code (Swift):
#if !TARGET_OS_IPHONE
import Cocoa
public typealias Controller1 = NSViewController
#else
import UIKit
public typealias Controller1 = UIViewController
#endif
And when I try to build it I get "No such module Cocoa" and it's true, iOS have no Cocoa module. Is there any way to create a platform-depended class?