for our project we always used one source file for both platforms: iOS and OS X. Right now I am migrating to swift. Unfortunately there is some files which need
import Cocoa
and on iOS
import UIKit
previously we did
#ifdef __MAC_OS_X_VERSION_MAX_ALLOWED
#import <Cocoa/Cocoa.h>
#else
#import <UIKit/UIKit.h>
#endif
Do you know how this can be done in swift? I don't like to write each class twice just because there is no macros anymore.
Thanks in advance
Jack
Use: