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
40 tips to make the most of your holiday marketing.
The holidays are just around the corner. These MailChimp e-commerce tips will help you make the most of your holiday marketing.
Swift Around the Web
Optional Non-Escaping Closures
One big thing in Swift 3 is that closures are now non-escaping by default. Must-read post by @olebegemann to understand the difference and especially when to use escaping
:
"Swift differentiates between
escaping
andnon-escaping
closures. An escaping closure is one that is (potentially) called after the function the closure is passed to returns β that is, the closureescapes
the scope of the function it is passed to as an argument."
What Do you do with Any?
Another big yet subtle change in Swift 3 - AnyObject
has been changed to Any
. Good explanation of when to use Any
and the power behind it:
"What at first glance looks like an empty generic container is really a powerful way of deferring type until necessary, making for a more flexible programming environment."
Coding
Tips for Backwards Compatibility with iOS 10 Today Widgets
Given how prominent today widgets now are in iOS 10, it is definitely time to make one if you haven't already! And thanks to @kristinathai, backwards compatibility to the old dark theme in iOS 8 / 9 is not that hard.
An Introduction to the UserNotifications Framework
A super useful and convenient guide to the new iOS 10 Notifications API for easy reference (and to avoid rewatching the WWDC video on the topic every single time!).
Design
From sketches to the iMessage App Store: How I got my stickers published in 8 days
Impressive to actually see a designer release iMessage stickers with 0 help from developers. Of course this means a super low barrier to entry - there will be lots of sticker packs. One big issue with the iMessage store is how it is structured into apps IMO. I think it should be more combined - so the user can simply search for a specific keyword, and relevant stickers just show up (some of which they could buy).
P.S. I approve of this use-case for iMessage Stickers π
Other Cool Stuff
Videos
Extending Xcode 8
No more Alcatraz β οΈ means we now have to work within Xcode's limited extension API to build our own useful developer tools. The good news is that the Xcode team is accepting radars and this is just the beginning.
Building a Tiny Compiler
As someone without a Computer Science degree, I admit that I didn't really understand what a compiler was until this simple explanation by @segiddins. Great talk for understanding what the Swift compiler is and how it works!
Swift Code
- ForceBlur - ForceBlur Animation for iOS Messaging Apps
- ConfettiView - Confetti View lets you create a magnificent confetti view in your app
- Reactions - Fully customizable Facebook reactions control
- Probably - A Swift probability and statistics library
- RevealingSplashView - A Splash view that animates and reveals its content, inspired by Twitter splash
- SJFluidSegmentedControl - A segmented control with custom appearance and interactive animations. Written in Swift 3.0.
Other Platforms
Contributing to the Server-side Swift World
Wow! @ptrpavlik's explanation to contributing to the server-side Swift ecosystem is so simple, I want to go and create a package right now!! And extremely clever to just find popular libraries in node.js or rails and recreate in Swift. Sooooooo much opportunity here!
Swift Thoughts
Last week, I had an absolute blast speaking at and attending #PragmaConf16 in fair Verona. One of my personal favorite talks was by @gridNAka about implementing the App Search API, mostly because this is definitely on my to do list and there are a bunch of little gotchas (including the fact that there is no good way to debug it) that only someone who's felt the pain can teach. You can see the golden sample code here while waiting for the video to be released (I'll make sure to put it on here when it is!).
Have a great week π