Podcasts I’m currently listening to

Jay Thrash (@jaythrash) is interviewed on the NSBrief podcast by Saul Mora (@casademora) during 360iDev

I previously posted a couple of times what podcasts I was listening to.  Back then, I was driving up and down the East coast every weekend between Maryland and Atlanta, so I had a lot of time to listen.  Now, my commute time is much less, thankfully.  That also means I spend less time listening to podcasts and audiobooks, and that time has a much more result-oriented focus. Continue reading “Podcasts I’m currently listening to”

Swift 2 Unit Testing & UI Testing Resources

Starting to write unit tests in Swift 2 / Xcode 7 so thought I would keep a list of resources and share.  Plan to keep this post updated as I find more.  Feel free to ping additional resources in the comments!


Google Analytics & Swift

students of knowledge working on Apple hardware

I’m working on an iOS app written entirely in Swift that uses the Google Analytics library.  At Google I/O 2015 they announced full support for Swift and even CocoaPods (which doesn’t actually work if any of your other libraries use_frameworks! – but they are working on that and it’s not a trivial fix).  The initial intro documentation from Google has options to show the code sample in either Objective-C or Swift, but all the rest of the documentation still seems to be Objective-C, only.  I was listening to the More Than Just Code podcast tonight and Aaron Vegh was remarking on how going back to Swift code just wasn’t clicking, and he found it easier to just write stuff in Objective-C.  So I thought, hey, until Google updates their docs, why not list some Swift code samples for how to implement various things in Swift.

Here I just want to look at a simple task: Event tracking in Google Analytics.  Yes, this might seem trivial, but when you’re a developer switching back and forth between Objective-C and Swift, sometimes it’s nice if someone points out the syntax, as per Aaron’s comments.

Here’s the Objective-C code (adapted from the Google Docs, link above):

[tracker send:[[GAIDictionaryBuilder createEventWithCategory:@"ui action"
                                                      action:@"button press"
                                                       label:@"do something"
                                                       value:@1988] build]];

And here’s the Swift equivalent:

tracker.send(GAIDictionaryBuilder.createEventWithCategory("ui action", action: "button press", label: "do something", value: 1988).build() as [NSObject : AnyObject])

btw if anyone comes up with, or knows of, a nice plugin for WordPress to color code Swift appropriately, please let me know! 😛



core data & cloud services for iOS in Swift

As an iOS / Swift mentor for Thinkful.com, every week I give my students a list of resources as a follow up to our mentoring session.  This week’s resources cover details of dealing with data loaded from the Internet, storing data locally (core data and alternatives to core data), and cloud services.  Finally we wrap up with some photoshop tips to automatically create 1X, 2X, and 3X assets for your iOS projects.


this week’s iOS related resources

tools of the trade

This week’s resources relate to putting together your UI in Interface Builder – Auto Layout, Adaptive Layout, Size Classes, Dynamic Text, and mastering the Interface Builder IDE.  Additionally, we touched on architectural design patterns (MVC, MVVM, etc.).  Finally, most of my students are starting to struggle with networking via the AFNetworking library, and using Objective-C libraries (although none of them know any Objective-C) in their Swift apps using bridge headers. Continue reading “this week’s iOS related resources”