From the Swift documentation:
Any Objective-C framework (or C library) that’s accessible as a module can be imported directly into Swift. This includes all of the Objective-C system frameworks—such as Foundation, UIKit, and SpriteKit—as well as common C libraries supplied with the system.
Where can I find the full list of available modules? I'm particularly interested in the common C libraries part.
It's the same modules that can be imported in Objective-C using the @import
statement (except the Swift
module, which is the Swift standard library that is only available in Swift and is always imported in Swift anyway). So what you can do to discover them is:
@import ...
and type some letter, delete it, and the autocomplete should show you a list of all the modules you can import.From what I can tell, besides the standard Cocoa system frameworks (like Foundation
), the only potentially useful ones are:
Foundation
) - the Objective-C runtime library (#import <objc/*>
)Foundation
) - the dispatch library (#import <dispatch/dispatch.h>
)If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With