The new iPhone App that we are releasing was written entirely in Swift. It’s a fairly simple app and I used it as a learning opportunity to learn the ins and outs of Swift. I’ve also been blogging about what I learned on my person blog here: Code Lysis.
I have to say that writing an App in Swift is very similar to writing it in Objective-C , the one major difference being the syntax. Otherwise, you follow the same patterns as in Objective-C. You still have an AppDelegate, you still need UIViewController subclasses, etc… I didn’t use a lot of Swift specific language features other than optionals because most of what you need when writing iOS Apps is contained inside UIKit which are all Objective-C classes that are translated to Swift classes. What I did find refreshing however was that the syntax was cleaner and easier to read/write.
This is also our first App that has iAd support enabled. Using Swift to add iAd support was quite a challenge as well, especially because the example code that Apple provides is written in Objective-C and seems a bit outdated. I’ll be adding a blog post about the challenges of adding the iAd banner to the App on my personal blog fairly soon.
This new app also enabled me to learn how to use the Storyboard to create the views and how to use segues to transition between UIViewControllers. In the process, I also learned how to write custom segues, which I hope to write about soon as well.Apple, iOS, iPhone, Objective-C, Swift