S Link
Migrating to Swift for iOS Developers
5-day class for iOS developers: Migrate your own Obj-C app to Swift, and explore new iOS 8 features. First class led by Homebrew pro developer Max Howell.
Swift Around the Web
More fun with implicitly wrapped non-optionals
"optional == isn’t all sunshine and unicorn giggles." @AirspeedSwift provides a very details must-read look at optionals and points out the little surprising gotchas every Swift developer needs to know. Open up your Playground for this one!
Nice Web Services, Swift Edition
"Swift structs are a natural home for your web service results - they are immutable, lightweight and have minimal boilerplate code requirements." Great walk-through of how to structure your code assuming the JSON parsing in Swift issues has already been solved (using SwiftJSON in this case).
Coding
Reader Submissions - New Year's 2015
@NSHipster readers submit their favorite iOS tips and tricks from 2014. So many good ones, I can't pick a favorite! Must-read for all iOS developers.
Pod Authors Guide to CocoaPods Frameworks
"TL;DR: CocoaPods 0.36 will bring the long-awaited support for Frameworks and Swift. It isn't released and considered stable yet, but a beta is now available for everyone via [sudo] gem install cocoapods --pre. Pod authors will especially want to try this version to make sure their pods will work with the upcoming release. This is because if a single dependency in a user's project requires being a framework, then your Pod will also become a framework." Best #iOSDev holiday gift ever!!!!
Let’s Bring Firefox to iOS
If you're looking to help out with an open source project this year, you will definitely learn a lot from this one!
Design
Mastering the Bezier Curve in Sketch
I have to admit that whenever I have to work with a Bezier Curve, I end up just googling how to do it and copying the answer from StackOverflow... I love how beautiful and visual this post makes the process. Bezier Curves are starting to make sense! Thank you @pnowelldesign!
Other Cool Stuff
10S Fork :: Slow Control
Have you ever been eating, and was like "you know what would be cool?!!! If my fork had an app..."
In Case You Missed It
I've been focused on two things in the past two weeks: Unit Testing and learning more Functional Programming, and I finally go to write down what I'm learning!
- How To Unit Test With Optionals In Swift
- Unit Testing Optionals In Swift: The XCTAssertNotNil Catch
- Unit Testing in Swift: Dependency Injection
- Unit Testing in Swift: A Quick Look at Quick
âť„
Videos
Top 5 Swift Meetup Videos of 2014
- Functional Programming in Swift by Chris Eidhof
- Building TableViews in Swift & iOS8 by Natasha Murashev (me!)
- Swift Thinking by Keith Smiley
- Swift and Objective-C: Best Friends Forever? by Jonathan Blocksom
- Lessons Learned Building “2048” in Swift by Austin Zheng
Swift Unit Testing - Verifying Method Calls
"The goal of this video is to teach you how to write a unit test to verify that a method was called." Full transcript available here.
Functional Voodoo
Functor and Monad in Swift
I think this practical post in combination with Railway Oriented Programming Video will bring you much closer to understanding Functors and Monads and how to use them. The terms are definitely intimidating, but it comes down to: "A Monad is a type of Functor. A type which, along with map, implements a flatMap function". Still processing, but getting closer...
You Are Learning Haskell Right Now (Or Anything You Want Really)
"I tried over and over again to turn my self doubt into a pure functional program, and eventually, it clicked." Just a nice reminder that this Functional Stuff is hard and might take a few seemingly hopeless attempts to actually click. Keep learning!
WATCH
WatchKit Animation Frame Rate Tutorial
@davidhoang: "Has anyone seen documentation on what the framerate for WatchKit image animations are?" @happywatchblog: "I couldn't find documentation. But, the answer I was able to determine is: 30 frames per second (fps)."
Developer Forums: WatchKit extension launches iOS app in foreground, bug?
In the last WatchKit Beta, Apple introduced the openParentApplication:reply:
API. This gave us the ability to open our iOS App from the Watch... or so we thought! Apparently this is an XCode Simulator bug. This method will only allow us to send a message to our iOS app in the background. This just highlights the importance of having the actual hardware present when developing for the Apple Watch. Hope it comes soon... is it early 2015 already?
Books
Out of the Tar Pit: Excellent paper about mutable state and how to avoid it.
Haven't gotten to it yet, but this is very high on my reading list right now! Thank you @kyleve for recommending it. Oh yeah, and it's FREE!
Swift Code
During the past week, I saw a lot of interesting Swift code snippets. So I'm going to share these instead of the open source libraries this week. Enjoy!
A pragmatic and intentionally non-abstract solution to JSON decoding
...doesn't require learning about five new operators.
Swift Thoughts
I've been fascinated by the idea of IOT devices for a while now, but I haven't experienced the true magic of one until I got the Fitbit Aria scale in the past two weeks. I stand on my scale, and it automatically syncs my weight to the Fitbit app via WiFi. What a magical experience!
Now I want everything else to sync - still looking for a water bottle that tracks and logs how much water I drink. I'm really excited by the IOT possibilities once the Apple Watch comes out. Happy 2015!!!