S Link
Last chance to join us at Swift Summit SF!
Swift Summit in San Francisco is a must-attend event for Swift developers. Hear from Nate Cook, Ayaka Nonaka, Chris Eidhof, Jessie Squires and ~17 other prominent speakers at the 2 day conference. Learn new things, make new friends, and give your Swift career a leg-up.
Readers of This Week in Swift can use the code โlastchance50โ to get a $50 discount on the regular price. Student / Unemployed pricing is also available. swiftsummit.com
Sharpen Your iOS Skills with an Advanced Bootcamp
Coding bootcamps arenโt just for beginners. Prepare your brain for an influx of iOS knowledge in both Swift and Objective-C and learn what you need to advance your career. This five-day course explores advanced iOS topics including concurrency, custom drawing, animated and interactive view controller transitions, and how to maximize the performance of iOS applications.
Swift Around the Web
JSONShootout: Compare several Swift JSON mappers.
Great look at three popular "JSON Parsing" libraries that actually deal with finding the best way to map JSON objects. This is that answer to the question "which Swift JSON Parsing library should I use?" Hint: it's not SwiftyJSON...
Thinking from Scratch with Sets in Swift
There are so many cases where Set
can be used instead of Array
, but I always default to Array
out of habit. Thanks @marinbenc for the reminder and detailed explanation of when, why, and how to use sets.
Coding
How to Do XCTestCase tearDown Wrong (and Right)
I never thought too much about how setUp
and tearDown
actually works. For example, I had no idea that XCTestCase
never gets allocated or deallocated. Make sure to tearDown
๐ฌ
Getting Started With RxSwift and RxCocoa
Love the simple explanation of reactive programming:
"Most programming in the Object-Oriented era has been imperative like that: Your code tells your program what to do and has many ways to listen to changesโbut you generally must actively tell the system when something changes.
Thatโs fine as far as it goes, but wouldnโt it be even better if you could set things up so that when something in your app changes, the code updates automatically? Thatโs the basic idea of reactive programming: your application can react to changes in the underlying data without you telling it to do so directly. This makes it easier to focus on the logic at hand rather than maintaining a particular state."
Apple News
Whole-Module Optimization in Swift 3
"Whole-module optimization is an optimization mode of the Swift compiler. The performance win of whole-module optimization heavily depends on the project, but it can be up to two or even five times."
Objective-C id as Swift Any
๐๐๐
"In Swift 3, the
id
type in Objective-C now maps to theAny
type in Swift, which describes a value of any type, whether a class, enum, struct, or any other Swift type. This change makes Objective-C APIs more flexible in Swift, because Swift-defined value types can be passed to Objective-C APIs and extracted as Swift types, eliminating the need for manual โboxโ types. These benefits also extend to collections: Objective-C collection typesNSArray
,NSDictionary
, andNSSet
, which previously only accepted elements ofAnyObject
, now can hold elements ofAny
type. For hashed containers, such asDictionary
andSet
, thereโs a new typeAnyHashable
that can hold a value of any type conforming to the SwiftHashable
protocol."
Other Cool Stuff
The secret behind Italyโs rarest pasta
Who wants to quit everything right now and go learn how to make this ๐?!!! Well, it's at least added to my foodie bucket list... Thanks @timshim for sharing this with me!
In Case You Missed It
Build Features, Not Apps - iOS Conf SG 2016
My talk from @iOSConfSG is out - slides here. This talk is a bit different from ones I usually do, but it's something I've been thinking a lot about over the past few months. Specifically, the future of the iOS ecosystem and where apps fit in. Build Features, Not Apps!
And while you're there, also check out @inamiy's talk on taking the lessons from JavaScript and applying them to Swift to build a Reactive State Machine ๐๐๐ And of course, here are all the other great talks.
Videos
Driving User Engagement with watchOS 3
I love this talk because it focuses on making your app usable without the user ever going into their physical iPhone App. This is something I discuss as the future of iOS development in my talk at iOSConfSG - I don't mention the Apple Watch in such detail, but it is definitely a huge piece of the new iOS ecosystem as it is the personal on-the-go device.
Result Oriented Development
"Result is actually the Optional
type with more power" - love this! Must watch talk to power up your Swift code ๐ช
Swift Evolution
private & fileprivate
Whoa! Apparently there's a mailing list discussion on reversing the fileprivate
vs private
access level decision in Swift 3.0. I think the distinction is definitely confusing, so agree that the minor convenience it brings is not worth the confusion / complexity.
Swift Code
- Macaw - Powerful and easy-to-use vector graphics Swift library with SVG support
- Each - Elegant โฑ interface for Swift apps
- FormValidatorSwift - The FormValidatorSwift framework allows you to validate inputs of text fields and text views in a convenient way. It has been developed and used by iOS developers at ustwo.
- MMCardView - Custom CollectionView like Wallet App
- DateTimePicker - A nicer iOS UI component for picking date and time
Learning
Paying Down Technical Knowledge Debt
My favorite and least favorite thing about being a software engineer is that there are an infinite amount of things to learn. I would get bored out of my mind if I didn't have a job where I was challenged this much (I've had a few jobs like that before my career switch ๐ฑ), but it can definitely get overwhelming feeling like I don't know so much most of the time.
Great article by @modocache on striking the balance between ignoring things you don't know and shipping vs taking the time to learn. There really isn't an answer to this. I personally just try to follow whatever I'm most excited about at the moment, all while knowing that I will never know everything and being ok with that.
Other Platforms
Swift on Linux
Thanks @ashfurrow for documenting the beginners steps on getting Swift running on Linux. Saves a lot of time for those of us in iOS ๐๐ป who are interested in experimenting but have no idea where to get started.
Swift Thoughts
Swift can speak! Ok, so this might not be the most useful ATM, but it's sooooo cool! Source code here.
Hope you get to build something amazing this week ๐