App Development using Swift - A Summary
15 Apr 2015My first app written in Swift has now shipped and with the Apple Watch update now live too I think we can call it done.
So what did I learn?
Swift - good and bad
The Swift language itself is pretty well designed, and a LOT easier on the eye than Objective-C. The syntax is pretty similar to many modern languages and I think I became reasonably productive quite quickly.
The only downside is that most of the code I wrote was generally just interacting with the iOS frameworks, which aren’t particularly Swift-friendly right now. This means you spend a lot of time dealing with nullable pointers, and with all the slightly mysterious ?s, the code loses some of the readability gains.
Hopefully this will get better over time, any maybe this year’s WWDC will see some progress in making the frameworks a little more Swift-friendly? Let’s hope so.
Summary
I enjoyed using Swift, and almost certainly for any new apps starting from scratch I’ll use it.
However I don’t see there is enough - or any - real advantage in porting any existing Objective-C code so any existing apps that I’m working on I think I’ll keep that way.
Anyway, I learnt a lot and I hope you enjoyed following along!
Previous posts in the series
- Plan for DaysLeft App
- Baby Steps using Swift
- Porting UserSettings Code To Swift
- Basic UI in Swift
- Writing a Today Widget in Swift
- Adding a Custom Control
- Swift and Build Odds and Sods
- Animating Progress
- Counting Weekdays Between Two Dates
- Getting ready to Ship Swift
- Waiting For Review
- Playing with WatchKit
- Count The Days Left Released
- Pushing a WatchKit App to the AppStore
The code for the project is also available on GitHub