Swift Around the Web
Dependency Injection with the Cake Pattern
Amazing use of protocols to decouple your code with elegance and simplicity π
SingleValueCodable
You too can extend Codable
to encode this JSON:
[
{
"caffeine" : 3,
"name" : {
"rawValue" : "earlGrey"
}
},
{
"caffeine" : 0,
"name" : {
"rawValue" : "green"
}
}
]
into this:
[
{
"caffeine" : "OK campers, rise and shine!",
"name" : "earlGrey"
},
{
"caffeine" : "low",
"name" : "green"
}
Coding
How to Use iOS DataΒ Protection
As more and more security holes get exposed to consumers (thanks @KrauseFx for exposing some of these π±) , data protection could be the top selling point for consumers for both Apple devices and the apps on the Apple platform. We've already seen Apple become a lot clearer about location usage in apps and not allowing the "Always Allow" option anymore in iOS 11.
So going above and beyond, including prioritizing framework options for protecting the user's files as described in this post, seems like a good long-term strategy for building the decreasing user trust.
Using tokens to handle async Swift code
Creating a simple RequestToken
object is a super simple solution to managing async tasks π
"Adding tokens to your existing asynchronous APIs can be a great way to easily add cancellation support, without having to completely rewrite your implementation. While other, more sophisticated async abstractions (such as Futures/Promises, RxSwift, Operations, etc) provide a lot more powerful features than simple tokens can offer - if all you need is cancellation, tokens can be a great option."
Design
11 Optical Illusions Found in Visual Design β Prototypr
I'm always fascinated by how the mind works... Incredible everyday design visualizations in this article that will truly hurt your brain. I swear that's a rectangle!
Other Cool Stuff
Videos
Swift Code
- Heimdallr.swift - Easy to use OAuth 2 library for iOS, written in Swift.
- BiometricAuthentication - Use Apple FaceID or TouchID authentication in your app using BiometricAuthentication.
- Swatch - Watcher for Unit Tests written in Swift
- CFNotify - A customizable framework to create draggable views
- OnlyPictures - A source of circular pictures, currently supports horizontal overlapping or separate pictures with great layout flexibility.
Business
What Getting Featured in The New App Store Could Mean For You
Initial analysis of the new App Store. Interesting to see that Apps get a much bigger download boost than Games. Now the only question is how to get featured...
Swift Thoughts
I'm excited to share that try! Swift will be coming back to Tokyo on March 1st and 2nd, with Peer Labs + Workshops on March 3rd! We have a great lineup of speakers planned and a few more will be announced soon via @tryswiftconf.
This is a great opportunity to make connections with your fellow developers from all over the world :) Most talks will be in English, and all talks will be simultaneously translated from English -> Japanese and from Japanese -> English to ensure maximum sharing of knowledge.
The cheapest Super Swift Bird tickets for our early supporters will only be available until December 1st, so make sure to get your ticket soon!
I'll see you there!