Conditional compilation?

Currently a lot of the code being written in Swift is for Apple platforms.
I want to write some code however that will require different compile-time imports for Linux, Mac, etc.
In Objective-C or C, I'd do something like

#ifdef __APPLE__

However how is that sort of thing done with Swift?

See The Swift Programming Language under “Conditional Compilation Block”.

Terms of Service

Privacy Policy

Cookie Policy