S Link
How to Transform Your Ideas into Software Products (50% off)
Learn all the steps to creating products people will pay for before they're even built! This book is written by the founding engineer of Mint.com: Poornima Vijayashanker. Poornima has gone on to help both technical and non-technical founders build profitable products and companies, most recently as an entrepreneur-in-residence at 500 Startups' accelerator program, and through her company Femgineer.
In this book she walks readers through a proven step by step process for validating your idea before you spend time and money building it, attracting customers without feeling awkward of pushy, leaving competitors in the dust with good design and positioning, saving time building only the features people will actually use, and learning how to recruit talented people to help build your product.
Use code natashatherobot to receive 50% off the e-book or 50% off the audiobook!
Trello is hiring iOS devs!
Trello is looking for experienced developers to help us realize the big plans we have for Trello. If you like Swift and have experience making highly interactive applications click the link.
Swift Around the Web
Lazy Properties in Structs
Finally, a clear explanation of how to work with reference types in structs (a value type), especially when your reference type is an expensive operation that is better off being lazily computed.
"Another option is to wrap the lazy value in a class, similar to the often-used Box type. Because classes are reference types, a struct can contain a let constant to a class instance and still be immutable even if the referenced object itself is mutated."
Swift Type Constrained Extensions: Express Yourself
" If you’re new to Swift coming from Objective-C, think of it as a category in Objective-C yet with the ability to specify type criteria so that your category (extension) only applies to the class if it conforms to a certain type."
I definitely need to take more advantage of this! Loved the UIBarButtonItem
example at the end!
Coding
Swift: The Only Modern Language without Mocking Frameworks
From @erikdoe - the creator of OCMock:
"Mock frameworks have proven convenient in many languages. It's not that they are essential, but they do add convenience. Stubbing a factory method to return a mock is quick and easy. Creating a protocol and a wrapper, and using dependency injection is probably more sustainable, but it is also more work and looks more complex. As ever, having options and making the right choice seems key."
Personally, I like refactoring my code to make dependencies explicit as I learn a lot in the process and end up making my code better. I wrote about how I do it in my recent blog post: Dependency Injection with Structs in Swift.
FlexMonkey: Apple Pencil Controlled Christmas Tree Bowling with SceneKit
"The first thing I'm amazed by is the speed of the simulation, with the physics and a particle system and the audio, my iPad Pro breezes along at 60fps. I even played with depth of field during development and that didn't affect the frame rate at all. Back in the late '90s, I was commissioned to produce a similar effect in CGI for a TV spot and that was taking several minutes a frame to render!"
After watching @FlexMonkey make this type of mind-blowing creative stuff with the latest tech and SDKs this year, I'm super excited to hear him speak at try! Swift in March!
Apple News
Guidance about translating "The Swift Programming Language" now up!
This is a great way to contribute to Swift for those who are just starting out!
If you'd like to intern with the #Swift team at Apple in Cupertino over the summer...
Send your resume to swift-intern@group.apple.com 🍏
Design
Saying Goodbye to the Great UX: Design Bonanza of 2004-2016
"We’ve been drinking our own Kool-Aid for so long that we’ve actually come to believe that great UX is something people want in and of itself. Great UX is actually the art of invisibility. UX has always simply been about the seamless delivery of great content or functionality."
Other Cool Stuff
In Case You Missed It
Protocol-Oriented Segue Identifiers in Swift
An elegant solution to handling multiple segue identifiers. You guessed it! There will be protocols...
The Trick to Working with CocoaPods on a Team
On one of the teams I’ve worked on, we had a lot of problems with installing CocoaPods. Team members had different versions of the cocoapods gem installed, and when someone ran pod install, it would mess things up for others. Here is how to solve that issue...
Videos
Functional Swift Conference
Super said I had to miss the Functional Swift Conference this year, but I've been catching up on all the videos!
alexisgallagher's talk on Protocols with Associated Types really stood out to me, since it helps me better understand something I wrote about this week: Protocol-Oriented Segue Identifiers in Swift. Also related, this swift evolution proposal to replace typealias
keyword with associated
for associated type declarations.
CommonCrypto in Swift, with Danny Keogan
Apple’s open-source CommonCrypto isn’t shabby for anyone looking to implement encryption in their app, but it isn’t very Swifty to use. Luckily, @iOSDevZone wrote a nice wrapper called IDZSwiftCommonCrypto, which renders Swift encryption a much friendlier beast.
Swift Evolution
The evolution will be televised: Current and upcoming proposal reviews
Great summary of upcoming Swift Evolution proposals in case you're not on the mailing list / don't have time and want a quick rundown (like I do). Another summary here. I also like the making classes final by default.
Thanks @ericasadun for putting this together!
WATCH
watchOS 2 Tutorial: Transferring images using transferFile
"Onto part 3 of my Watch Connectivity series. We’ll be looking at the transferFile API today – in particular, we’ll be transferring an image from the watch to the phone, but the same API can be used to transfer data and other media files."
There will be 🐶🐶!
Apple TV and Apple Watch SDKs are Here
"With this new SDK for watchOS 2 we’ve brought the full amazing experience of the Parse SDK, so you can build apps that run purely on the Watch. As a result, your app can load faster and won’t need a phone to stay connected."
I'm a huge fan of Parse, so of course this is an exciting release! Oh, and Parse has been open sourced earlier this year. You can dig into the implementation here.
Podcasts
The Talk Show, With Special Guests Craig Federighi and John Siracusa
Amazing to hear Craig Federighi, Apple's Senior VP of Engineering, talk in so much detail and so much openness about Swift (transcript here). For those looking to introduce Swift into their company codebase, consider this:
"Even teams where, for one reason or the other, they can’t jump right on Objective-C — or rather Objective-C conversion to Swift now. They then use Swift heavily for writing all their unit tests, which is great because then at least as they’re introducing new APIs, they’re experiencing their own APIs in Swift and then … sort of eating their own dog food in that regard."
The Apple Pencil, and Open Source Swift
I haven't looked into iPad Pro or Apple Pencil at all, so I really enjoyed hearing @carolinebegbie discussing it.
Swift Code
- Depressed - Swift iOS app that tests if you are depressed
- Whisper - make the task of display messages and in-app notifications simple
- swiftra - Sinatra-like DSL for developing web apps in Swift
- Epoch - Venice based HTTP server for Swift 2.2 on Linux
- MTPrivateTrainerAnimation - This is a swift exercise of Private Trainer's Onboarding Animation
- Switcher - Custom UISwitcher with animation
Swift Thoughts
Super impressive to see the first community (non-Apple dev) Swift language evolution proposal accepted! Great work @ericasadun 🎉!!
This brings Apple's commitment and open-mindedness to open-sourcing Swift and truly working together with the community on Swift to a whole new level. Wow!
For more Swift open-source community news, make sure to check out @jesse_squires's amazing weekly brief.
We already received Swift as our early 🎁, but I hope you enjoy the rest of your holidays!