S Link
The Swift Algorithms Book (30% off)
Written for students and professionals, The Swift Algorithms Book blends modern code, illustrations and computer science to help you pass the interview or build your next app. Perfect for the classroom or the office, the book takes a fresh approach to explain concepts that power search engines, databases and social networks. Use code coupon code THEROBOT at checkout to receive a 30% discount!
Bring Your Team To LIfe
Stop losing momentum with reply-to-all wars and buried email messages. Cut to the chase with @mentions and get the answer you need. $0/Unlimited Users. Get Started
Swift Around the Web
Swift: Selector syntax sugar
For sure one of my favorite Swift 2.2 feature is the much safer non-string selectors! But the new version is still super painful. Love this design from @andyyhope on taking your Swift 2.2 selectors from this:
- button.addTarget(self, action: #selector(ViewController.buttonTapped(_:)), forControlEvents: .TouchUpInside)
to this:
- button.addTarget(self, action: .buttonTapped, forControlEvents: .TouchUpInside)
π
Get ready for Swift 3.0 -Remove of ++ -- and C style for loops across a project
Super useful regular expressions for searching and replacing the outdated Swift 2.0 code early in preparation for Swift 3.0 π
Coding
Apple's 2016 Announcement - What This Means for iOS Developers
Good overview!
" The 4-inch screen isnβt going away any time soon. Developers must maintain an understanding and visual conception of apps on a small screen. It is still necessary to create an app that is visually appealing on both a 4-inch screen as well as the variety of larger screens available across multiple devices."
Creating Swift Frameworks for iOS, watchOS, and tvOS via Carthage and CocoaPods
Great overview for those thinking of creating an open-source Swift framework. Don't forget to include Swift Package Manager as well!
Apple News
Swift 2.2 Released!
Swift 2.2 includes contributions from 212 non-Apple contributors and 7 accepted Swift Evolution proposals πππ Some great TL;DR notes on the included Swift Evolution proposals here.
Xcode 7.3 Now Available
This includes super nice auto-complete in the console debugger! Oh, and this!
Other Cool Stuff
What is that yellow line on the sidewalk?
I saw these yellow lines everywhere in Japan, and this tweet by @waynehartman made me look more into them. Such a cool real-world UI improvement!
In Case You Missed It
I Heart Storyboards & Nibs
One of my favorite talks at @tryswiftconf (ok, every talk was my favorite!) was when @helenvholmes talked about how to get designers into code. One of the big things to do is very obvious - use Storyboards! Immediately, this comment was a bit controversial among developers. Honestly, I don't see the whole controversy....
Videos
Contributing to Open Source Swift, with Jesse Squires
Amazing talk by @jesse_squires - making it less intimidating to contribute to Swift:
"You do not need to be a compiler expert to have an impact on Swift or any of the various projects, but I think having a high-level understanding of how the Swift compiler works can help situate you within the project and help to define your area of contribution. No matter your what your skill set or experience level are, there is something you can do to make Swift better!" - Jesse's thoughts
Design of Everyday Swift, with Rachel Bobbins
An absolutely beautiful talk applying the Design principles from Don Normanβs "The Design of Everyday Things" to Swift artchitecture!
Swift Evolution
SE00053 [Active for Review]: Remove explicit use of `let` from Function Parameters
Love this proposal to remove let
from function parameters. func foo(let x: Int) { ... }
-> func foo(x: Int) { ... }
. Big change, but hope it gets approved!
Swift Package Manager
#swiftlang Try Running The Swift Package Manager on Travis CI π
Run $ swift build
on Travis CI π
ο£ΏWATCH
Notes on WatchKit
"The best things, by a country mile, are the dynamic notifications. This allows you to build a custom UI to display in response to a notification. Since notifications are undoubtedly the watchβs βkiller appβ, this had to be good, and it is."
Books
Advanced Swift
This is definitely on my reading list...
"I think Advanced Swift fills a real niche in the Swift community because it is not a book about writing apps for iOS or the Mac in Swift (although the book is certainly relevant to app developers). Instead, the authors focus on the language itself and its standard library, exploring topics deeper than Appleβs language guide can." - @olebegemann
Swift Code
- SwiftyStoreKit - Lightweight In App Purchases Swift framework for iOS 8.0+ and OSX 9.0+
- Gifu - High-performance animated GIF support for iOS in Swift
- TypedDefaults - TypedDefaults is a utility library to type-safely use NSUserDefaults. context tweet
- Sensitive - Fresh look at work with gestures in Swift.
- NumberMorphView - A label view for displaying numbers which can transition or animate using a technique called number tweening or number morphing.
- SwiftImageProcessing - This project demonstrates how to do pixel operations in swift.
Swift Thoughts
The NPM left-pad saga is a good reminder to be mindful of which (and how many) external libraries you use in your projects. This is especially true for Swift.
There are a lot of open-source libraries in Swift that provide a list of functions or utilities from other languages, such as Ruby or Haskell for example. Instead of installing the entire library, I tend to just copy / paste (and maybe modify if needed) only the functionality I need - especially if it's only a function or two. And of course I add a link to the library in the comments of my code to look through it later if needed!
Another bigger issue with Swift libraries is that they might not be updated to the version of Swift you need when you're updating your own project! I spent over a day trying to fix older open source Swift code that I really wanted to use only to end up just writing my own solution.
One way to monitor this is by looking into the how active the contributions to the libraries are. For example, based on previous commits, I am very confident that Quick will be updated with the latest Swift version the day that that version comes out! I also have more confidence that a project will be actively maintained when it's backed by a bigger company, such as IBM (of course we all know from Facebook's shut down of Parse that that might fail as well, but I think smaller one-person open source projects are more likely to fail / stop developing).
Finally, if you're working in a larger company and / or have a serious production app, it's good to keep your own copy of the external libraries in case the author decides to delete the original as happened in NPM's case!