... And we're back! Once again, I can't believe how amazing the Swift community is all around the world. I had a really great time organizing (with an unbelievable amount of help from the community 👏👏👏) and meeting everyone at try! Swift Tokyo earlier this month.
My favorite part of the conference this year was our very first hackathon. I loved seeing all the creativity that is out there - stuff I would never have dreamed of. And I can't help being impressed with the winning projects - a drawing app using 3D Touch to move each drawn element around the screen! You can view all the amazing submissions here.
Keep pushing the limits of Swift 🚀
Swift Around the Web
That One Optional Property
An amazing analysis of when we use "that one optional property" in the View Controller, what we really mean when using it, and how to make the code a lot more powerful by extracting the optional into an enum. Really something to think about every time you're tempted to add that one optional property. Must read!
The weirdest subclass I've ever written
At the try! Swift Tokyo hackathon, one participant came up to me asking how he could solve a problem he was having using protocols. After talking through it, we decided that there was no reason for him to use protocols. In fact, classes were better for his use-case.
This article is another good reminder that even though protocols are extra popular in Swift, they might not be the best answer every single time. Use it as a tool, just like you use object-oriented programming as a tool.
"There are numerous syntactic differences around each and – since protocols and subclasses overlap significantly in the problems that they can solve – you can validly choose between subclassing and protocols for a range of different syntactic reasons rather than a strict design rule."
How do your users really use your app?
Conveniently access your app logs in development & release including end-to-end encryption with the SwiftyBeaver Logging Platform for Swift. Learn how your users use your app, where and why they fail and on what you should really focus your development to make your users happy & willing to pay.
SwiftyBeaver is the creator of the most popular open-source logging framework for Swift 2 & 3 with over 2,250 Github Stars. It enables convenient logging during development and release without the need to change frameworks in between.
Leverage a vibrant community on Slack & Github, the option to use in-house servers for enterprise customers and a free, native Mac App to get the valuable insights you need to make your app even more successful.
Job Offers Without the Hassle - Try Hired
Finding the right role can be daunting, but not on Hired. Get empowered to find the right role with multiple job offers and free personalized support.
A beautiful approach to cleaning out your
AppDelegate using Swift protocols to create a "plug-and-play" architecture:
"You can create
ApplicationServices, those are objects that shares the AppDelegate life cycle and performs actions on its steps. Your AppDelegate then becomes observable and your services are its observers. This approach allows you to decouple AppDelegate from its services and create Single-responsibility objects."
The font of all... well, some knowledge
An interesting and easy approach (hack?) for implementing dynamic type for a custom font 🤔
"The implementation for the preferred font uses the standard
UIFontclass method to get the system font for the preferred text style and uses that font's point size to create a custom font of the same size."
New Swift podcast by @jesse_squires & @simjp. The first episode looks at the history of Swift open source. I really hope this podcast continues, as there aren't other good podcasts specifically focused on Swift like this, so this would definitely be a valuable addition to the community.
- Spry - A Mac and iOS Playgrounds Unit Testing library based on Nimble.
- RequestPermission - simple permission request with beautiful UI
- SelectableTextView - A text view that supports selection and expansion
- Serpent - A protocol to serialize Swift structs and classes for encoding and decoding. Blog post here
- CTPanoramaView - A library that displays spherical or cylindrical panoramas with touch or motion based controls.
- Smile - 😄 Emoji in Swift
In Case You Missed It
Architecting for Features
A few months ago, I gave a talk titled Build Features, Not Apps at iOS Conf SG – you can view the full talk here. It was clearer than ever to me after WWDC 2016 that the future of apps is a web of distributed features instead of one concentrated app. Think of Apple Watch, Today’s Widget, Interactive Notifications, App Search, iMessage Stickers, Apple Maps Integration and the list goes on…
So I made it a priority for the try! Swift app to focus on extracting the model layer into a CocoaPod instead of adding new and fancy features. Now I can move much faster adding the greatest and latest to the app 🏃🏻♀️
💻 Swift Full Time
- iOS Software Engineer @ trivago - Düsseldorf, Germany
- iOS Developer @ Nexmo - London, UK
- iOS Developer @ Willow Tree - Durham, NC, USA
Random Cool Stuff
SpaceX to Send Privately Crewed Dragon Spacecraft Beyond the Moon Next Year
I really think that space tourism should become relatively affordable in our lifetimes. This is one step forward (this is another)... although I'm sure the two individuals going on this trip have paid A LOT, maybe in 10 or 20 years, some of us will be able to go as well 🙋🏻🚀🌚