As many of you know Apple released a new programming language called Swift at WWDC conference last week. It created such a buzz around the Internet that the Swift iBook (html version) was downloaded 350,000 times on the first day! Since then there are many Swift meetups, Swift video tutorials, Swift blogs popping up all over the place.
Now, although Swift is syntactically different from Objective-C, it can co-exist with Objective-C projects and interact with each other. This is important because you don’t want to throw away all the Objective-C code just to start using Swift. So I thought it would be cool to create a short video that shows how to simply convert one of the Objective-C classes of the sample app that comes with Salesforce SDK’s forceiOS tool into Swift to give you an idea of how it works and feels.
In the [~12 mins] short video, you will learn:
- How to integrate Swift into an existing Objective-C project
- Get a taste of Swift programming language
- Compare Swift with Objective-C
- Deal with some of the quirkiness of early XCode 6 Beta
Source Code: You can download the source code here: https://github.com/rajaraodv/Swifty
1. Swift needs Xcode6 beta 2 and iOS 8 beta iPhone simulator.
2. XCode6 needs latest Mavericks or Yosemite (iOS 8) operating system.
3. Be warned that XCode 6 is very flaky, especially when you want to use Swift in Objective-C projects.
If you have any questions, please contact me on Twitter: @rajaraodv