O'Reilly logo

Learn Swift 2 on the Mac, Second Edition by Waqar Malik

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter    20

Interoperability with Objective-C

Swift is an awesome language and works great by itself, but when you’re writing iOS or OSX applications, you have to interface with the frameworks that Apple provides and perhaps with your own existing frameworks. You may be able to rewrite your own frameworks in Swift, but Apple has not rewritten its frameworks in Swift yet, if it ever will. Apple does provide interoperability with existing frameworks that use the Objective-C and C APIs.

Note  Interoperability in this case is the capability of interaction between the Swift and Objective-C APIs in either direction. This means being able to use the Swift API in Objective-C code and the Objective-C API in Swift code.

To use Swift in Objective-C ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required