26 Your First Cocoa Application
One of Swift’s most compelling features is its ability to interact with Objective-C, the language in which Mac and iOS apps have traditionally been written. We are not going to cover the full story of how the two languages live side by side in one app, but the next three chapters will give you a taste. Swift makes it possible to use Objective-C libraries like Cocoa, the native API for developing desktop Mac apps.
Swift is able to talk to Cocoa (and other Objective-C frameworks) using techniques broadly described as bridging. Bridging is the process by which a function or instance in one language can be called from or given to the other language. The bridging goes in both directions: Swift can call ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access