Swift ThoughtsSwift Thoughts

As more and more amazing and necessary Swift-only libraries come out and I attempt to work on Swift-first projects, I find myself constantly checking whether CocoaPods has added Swift support yet. Cocoapods is such as big part of my iOS developer workflow, that I can’t imagine NOT having libraries I want to use supported!

Well, last week, I was lucky to meet Eloy Duran, the creator of CocoaPods, at iOSDevCampDC. I learned that the reason CocoaPods does not support Swift yet is because you can’t make a static library in Swift. That might be because Apple wants us to use frameworks moving forward. This means that CocoaPods would have to be significantly modified to support frameworks in addition to the Objective-C static libraries.

There is currently a discussion among the CocoaPods contributors about how to best handle this transition. Eloy recommended submitting a pull request for your specific use-case to get the project and discussion moving in a more practical hands-on direction!

With that, here is this weeks exciting Swift happenings…


Apple Love

XCode 6 Beta 5 came out this week! I'm a big fan of the new ?? operator. Here are this week's Apple resources that you should definitely check out if you haven't already:

Swift Around the Web

Colin Eberhard did a great analysis of Swift Adoption Statistics based on Github and StackOverflow contributions. The conclusion is that Swift Adoption is about 30% among Objective-C developers at this point. So if you're doing a talk about Swift, don't assume that everyone has gotten a chance to play around with it just yet!

Swift Code

It didn't take long for Mattt Thompson, the creator of AFNetworking, to come out with Alamofire - the new elegant networking library in Swift. AFNetworking will of course continue to be supported, but those of us who are bold enough (or have a small enough side project) can get a head start with Alamofire...

  • Alamofire - Elegant Networking in Swift from Mattt Thompson
  • SwiftFlux - An attempt to gather all that is in flux in Swift.
  • Async - Syntactic sugar in Swift for asynchronous dispatches in Grand Central Dispatch
  • Swell - Logging utility for Swift and Objective C

In Case You Missed It

It's crazy how many gotchas come with Swift optionals. This week, I discovered how to unwrap multiple optionals. My favorite thought about optionals comes from a tweet by @Kronusdark.

Random Cool Stuff

During iOSDevCampDC, @borkware shared a note from Apple when Macintosh programming first came out. It was titled "Everything You Know Is Wrong". I can't help but feel like we should apply this logic while learning Swift...