O'Reilly logo

Application Development with Swift by Hossam Ghareeb

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

Using Objective-C and Swift in a single project

As an iOS developer, before Apple released Swift, you may feel worried about your old code in Objective-C and wonder if you can use them together. The answer is yes, you can use Swift and Objective-C together in a single project, and everything will be fine, irrespective of whether the project was originally in Swift or Objective-C. This compatibility is very important in making the language easy to use and has been welcomed by all developers. So, you can use Objective-C frameworks (system frameworks or your custom frameworks) in Swift, and you can use Swift API's in Objective-C code.

Importing Objective-C in the Swift project

To import some of your old Objective-C files in the Swift project, you

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