Simon Allardice explores the capabilities of Swift and Objective-C, showing how and when they intersect and demonstrating how to migrate existing Objective-C projects to Swift and work with both languages in the same project.
- View Offline
- This is a course on using Swift and Objective-C together. One of the goals of the new Swift programing language was to be inter-operable with the older Objective-C. It has to be. Objective-C is how we've built Mac and iOS apps for many years. It's a huge part of the landscape of Apple development. And even if you wanted to write nothing but Swift, you can't avoid Objective-C. You might not have to write it, but you still have to deal with it. So in this course, we'll directly compare the languages. Seeing what Swift can do that Objective-C can't. We'll explore how to migrate existing Objective-C projects to Swift, see how to work with both languages side by side in the same project and importantly, how new Swift code can seamlessly use existing Objective-C libraries and frameworks and the tips, tricks, best practices and the things to watch out for when doing that.
Objective-C is the history of modern Apple development. It's where our coding practices, our patterns and our standards come from. But Swift is the future of it and right now we have both, and we need them to play nicely with each other. This is how we do that. I'm Simon Allardice, let's get started.
Need a refresher on either language? Check out Swift Essential Training and Objective-C Essential Training.
- Exploring the interoperability of Swift and Objective-C
- Comparing language syntax
- Understanding how each language uses objects and methods
- Bridging arrays, dictionaries, and numbers
- Dealing with nil return types from Objective-C methods
- Working with NSError in Swift
- Working with Swift and Objective-C strings
- Adding Swift to an existing Objective-C project
- Inheriting between languages