S Link
do{iOS} conference, November 9th in Amsterdam
The conference for iOS developers in Amsterdam, The Netherlands. Learn about the latests advancements in Apple technologies. Gain in depth knowledge through sessions about iOS, Swift and the latest frameworks. Get inspired by talks from Daniel Jakult, Daniel Steinberg, Natasha the Robot and many more. Limited tickets available
Join us at Swift Summit SF!
Swift Summit in San Francisco is a must-attend event for iOS developers. Hear from Chris Eidhof, Natasha Murashev, Andy Matuschak, Daniel Steinberg and ~20 other prominent speakers at the 2 day conference. Learn new things, make new friends, and give your Swift career a leg-up. There are rumors of a 🎤Karaoke 🎤tradition at the after party, too :)
Readers of This Week in Swift can use the code "RobotFriends" to get a $100 discount on the regular price. Student pricing is also available. Only a few more tickets left!
Swift Around the Web
Ruby replaces Objective-C in TIOBE index top 10
- Objective-C in October 2014: # 3
- Objecitve-C in October 2015: #14
Meanwhile, Swift moved up from #19 to #15 in the same time period.
"It was a matter of time. Soon after Apple announced to switch from Objective-C to Swift, Objective-C went into free fall. This month Objective-C dropped out of the TIOBE index top 10."
The writing is on the wall. Tell your friends to start learning Swift if they haven't already!
Coding
UIKit changes in iOS 9
@jesse_squires points out a very small (but actually big "deliver us from evil") change in iOS 9 - assign
was replaced with weak, nullable
in UIKit 🎉.
"We no longer have to suffer through tracking down obscure bugs due to non-zeroing weak references."
"The issue is that a non-zeroing reference ends up pointing to invalid memory (because the reference is not zeroed out), thus when you attempt to access that memory (by sending the object a message) — you'll crash."
Yep, I've definitely had that crash before... Glad to have one less obscure bug to hunt down.
CLANG_WARN_NULLABLE_TO_NONNULL_CONVERSION
Xcode 7 includes a project setting named “Apple LLVM 7.0 - Warnings - All languages > Incorrect Uses of Nullable Values”, or CLANG_WARN_NULLABLE_TO_NONNULL_CONVERSION
.
Read this to learn what it actually does, when to use it, and the gotchas you'll encounter.
Design
Taking activity tracking to the next level with the iPhone 6 and 6S
Love the idea of turning on Low Power Mode in apps. Now I wish all apps had that...
Other Cool Stuff
Moon Shots
Make sure to check out more than 8,400 high-resolution images from NASA’s Moon missions uploaded to Flickr!
In Case You Missed It
#ghc15: Natasha Murashev – The Zen Guide to WatchOS
@catehstn wrote up a summary of my WatchOS talk at Grace Hopper Celebration this week! Thanks Cate!
You can view a similar talk I did at NSSpain available here and, of course, check out my blog for current and upcoming WatchConnectivity tutorials!
Tutorials
iOS 9 Multitasking Tutorial
iOS 9 introduces a phenomenal feature for the iPad — multitasking. For the first time, iPad users can run two apps on the screen at the same time.
In this iOS 9 multitasking tutorial, you’ll learn how to update an existing app so that it plays nicely in a multi-tasking iPad environment.
Videos
F-Yeah Swift: 4 Features That Changed How I Code, with Jacob Schwartz
A pretty entertaining short talk (>7 minutes yay!) about how Swift is awesome (mostly...). @isoiphone talks about how Swift's features including Strong Type System, Immutability, Properties, and an Awesome Community have made his code more expressive and fun to write, making him more productive compared to other languages.
Cast-Free Arithmetic in Swift, with Richard Fox
Casting numbers of different types when the result type could easily be inferred can be a pain. In this talk, @RGfox trades a small amount of type-safety for a great amount of convenience. Using Swift 2.0’s protocol extensions, pattern matching, generics, and operator overloading, Rich simplifies number arithmetic between types.
Functional Voodoo
Let's talk about Monads
The simplest definition of a Monad and Functor I've seen:
"A Monad is simply a type that has a
flatMap
method, and a Functor is simply a type that has amap
method."
No burritos for you!
Swift 2.0: Map and FlatMap Demystified
A very simple and clear comparison between map
vs flatMap
with code examples for Optionals and Sequence Types for each. Full playground available on Github here.
Swift Code
- PermissionScope - Intelligent iOS permissions UI and unified API
- xcode-snippets - Xcode Snippets for Swift 2, based on those by Mattt
- PathKit - Effortless path operations in Swift
- Cereal - Swift object serialization
- UIColor-Hex-Swift - Convenience method for creating autoreleased color using RGBA hex string.
Learning
Writing
@kristinathai's Grace Hopper Celebration talk on Becoming a Better Engineer Through Writing was one of my favorites from the conference (and not only because she wore a cape during it!).
I found myself referencing it to so many people throughout the conference, many of whom didn't attend it! Luckily, Kristina put up an entire page on her website with the slides and write-up of the talk included. Amazing speaker touch to an already incredible presentation.
Swift Thoughts
Last week I spoke at and attended the Grace Hopper Celebration in Houston, where I met many amazing professional and student iOS developers in the community - including Apple engineers, some of whom worked on Swift and WatchOS!
It was a pleasure to host our very own iOS@GHC community dinner with @kristinathai and @ayanonagon. And yes, of course there was (Taylor) Swift-themed swag! You can read more about the event on @catehstn's blog here (thanks Cate for the write-up!).
So for this week, I leave you with my favorite quote from Grace Hopper herself:
"A ship in port is safe but that's not what ships are built for." 🚢