Articles tagged:

udacity

An Accidental Swift App

Sat 27 June 2015

I’ve got a few plans on how I will be picking up the language. The first few steps involve reading the specification and catching up on the videos from the past couple of WWDCs.

However, in the process of checking out some courses on Udacity, I discovered that some of their introductory iOS courses are being taught in Swift.

So I dipped my toes into the Swift waters by creating a relatively simple app as the project for the Intro to iOS App Development with Swift course.

Syntactic Differences

Creating the app was primarily a matter of getting used to the syntactic differences in how Swift uses the Cocoa APIs versus how Objective-C uses them.

The main thing that tripped me up was the use of optionals. I did some reading on them last year, but all of that is pretty fuzzy at this point. So basically, I just mashed the tokens around until Xcode compiled without any warnings.

AVFoundation

One other thing of which the app made use was AVFoundation for recording and playing back audio. That was a bonus for me since I’ve never used it, but have been planning to learn some of the basics for my current “real” app project (i.e. one I am planning to publish to the App Store).

Conclusion

Anyway, that was an unexpected diversion, but it made for a fun couple of nights. I’m looking forward to spending more time working with Swift. The plan is to maybe incorporate a module or two of Swift into my current project. We’ll see how that goes.

Page 1 / 1