I prefer Swift over Objective-C. I recently converted AccelaStudy and associated internal frameworks from Objective-C to Swift, about 30,000 lines of code. The new Swift code is easier to extend and debug; I’m glad I ported it over. It takes forever to compile, though.
Swift’s guard statements are the new assertion and I use them all over the place. I love Swift’s support of map and reduce. I miss C# async and await so I use then which combines promises with async/await.
I am aware of the Swift Evolution proposal for native Swift support of async and await. That the proposal is written by Lattner himself gives me high hopes that it will be a part of Swift in the near future.
I prefer SQLite databases for persistent storage in iOS apps. I never use CoreData but have some affection for Realm. I use GRDB for SQLite access. I use KiteKit with Kite Compositor or Lottie from Airbnb for creating complex animation sequences. I use RazzleDazzle from IFTTT for full-screen animated intros. The socket.io client and Starscream work well for socket programming. I use CleanroomLogger for logging.
I use SwiftLint to clean up my Swift source code. I like source code files to all adhere to the same coding conventions. I haven’t published my own coding conventions but they pretty much look like this.
I primarily do my work in Xcode but often switch over to AppCode from Jetbrains. AppCode’s plugin architecture allows linting to be done in realtime and features like highlighting code issues such as “unused import” are very helpful.
While I am not a hardcore Test-Driven Development afficionado, I do write a lot of unit and integration tests and do so in Xcode for iOS apps. I use Xcode’s built-in code coverage tool to measure code coverage. I always have at least 70% code coverage and strive for 100% coverage, though this is a challenge. I try to write my code using Dependency Injection and other similar design patterns to enable high code coverage using mocks and fakes. I’ll give a shout out to Michael Primeaux for making me a believer in automated testing.
I aggressively update any open source code that I use. Having a lot of automated tests and a high code coverage gives me the “safety net” in which to do this. I try to keep up with the latest version of Swift but refuse to adopt the latest version of iOS until a month or so before the shipping version is released. On the “bleeding edge” I’ve spent more time debugging Apple’s defects than resolving my own.
I’ve used Fabric (previously Crashlytics) and HockeyApp for crash reporting. Since Microsoft bought HockeyApp and made it free for all applications, I now use it exclusively. I’ve used mixpanel and Amplitude for application analytics but now directly use AWS services (Kinesis and Athena).
I keep all source code under Git for version control. I use GitHub for personal projects and AWS CodeCommit for Renkara projects. I’ve used Visual SourceSafe, Team Foundation Server, and Subversion in the past but Git is easily the best choice now. I tend to follow GitFlow for managing branches. While I sometimes use the command line, I more often use SourceTree, Tower, or GitHub’s desktop client for managing Git repos.
I use TextExpander to store snippets of code which I insert with a simple keybinding. Most of my Swift keybindings start with the letter x. For example,
xtable pastes in an entire UIViewController implementation with a UITableView and UITableViewDataSource and UITableViewDelegate extensions.
I have some talent as a graphics designer and use a combination of Adobe Illustrator and Photoshop to create screen mockups, icons, and other app-related artwork. I have been an Adobe Creative Cloud subscriber since it became available. I use Asset Catalog Creator Pro to quickly turn icon source artwork into the various icon sizes required by the App Store.
I create app demos and other animations using Adobe After Effects.