S Link
Join us at Swift Summit SF!
Swift Summit in San Francisco is a must-attend event for iOS developers. Hear from Chris Eidhof, Natasha Murashev, Andy Matuschak, Daniel Steinberg and ~20 other prominent speakers at the 2 day conference. Learn new things, make new friends, and give your Swift career a leg-up. There are rumors of a 🎤Karaoke 🎤tradition at the after party, too :)
Readers of This Week in Swift can use the code "RobotFriends" to get a $100 discount on the regular price. Student pricing is also available!
Swift and iOS 9 One-Day Bootcamps
Apple hasn't stopped improving, and neither should you. We’re bringing our Swift and iOS 9 training to London and cities across the U.S. In these one-day bootcamps for experienced developers, we'll tour the latest updates in Swift and iOS 9, and teach you how to bring your apps into the future. Each bootcamp is priced at $900. Students who register for both Swift and iOS 9 classes receive a $200 discount.
Swift Around the Web
Lyft Goes Swift: How (And Why) It Rewrote Its App From Scratch In Apple's New Language
I agree, if you have to fully rewrite your app, do it in Swift and don't look back! If you have an existing Objective-C app that you're still maintaining in production, start by adding tests in Swift, and then move on to adding any completely new features in Swift. I'm not a big fan of going back and re-writing your Objective-C code in Swift. If it works, there's no need to re-write it just so it's in Swift.
Swift Generic Protocols
Protocol 'GenericProtocol' can only be used as a generic constraint because it has Self or associated type requirements.
Good explanation of the above error message and how to actually make Generic Protocols work in Swift.
Coding
View Controller Previews 👓
"View Controller Previews are another iOS SDK feature announced with 3D Touch on the iPhone 6S and iPhone 6S Plus. They allow users to easily "peek" into a piece of content by pressing lightly, then pressing a little more firmly to actually open it." Take a look...
Xcode Server Hacks: 3. Install CLI tools for _xcsbuildd
Running many useful tools such as CocoaPods and fastlane has become a lot more complicated with the introduction of the new rootless mode in OS X El Cap. This post discusses how to hack around the issue.
TL;DR? Login as
_xcsbuildd
, install your tools and then addsource ~/.bash_profile
to your bot scripts.
Apple News
tvOS
I personally got into iOS development because I love working with smaller screen sizes. The same goes for the Apple Watch - I love an even smaller screen size!
So while the new tv opens up a ton of opportunities for iOS developers and it sounds really cool, I will personally continue focusing on the smaller devices. If you'd like to learn more about tvOS, make sure to subscribe to other resources out there! I'm sure there will be plenty :)
That said, here are a few resources I enjoyed looking over right after the announcement:
GM Seeds Now Available
Xcode 7 is now official!!! Doesn't look like there were many changes from beta 6. Xcode 7.1 Beta is now also available for those who are excited to start development for the tv!
Pro tip: use xcode-install to install and update your Xcodes from the command line. Seriously, this is the best!
Get Your Apps Ready for 3D Touch
"Phone 6s and iPhone 6s Plus introduce an entirely new way to interact with your phone. For the first time, iPhone senses how much pressure you apply to the display. In addition to familiar Multi–Touch gestures like Tap, Swipe, and Pinch, you can now add 3D Touch-enabled actions that bring a new dimension of functionality to your apps." 🎉
Design
"Incredible way of making my two star review seem like I didn't hate the film"
A good reminder of how powerful design can be. And, of course, with great power comes great responsibility...
Other Cool Stuff
In Case You Missed It
#iOSDevUK: The Swift Architect
@catehstn did an amazing write-up of my iOSDevUK talk 💜💜💜. It wasn't recorded, so this is the only place you can get a summary. Super cool! You can find the slides to go with the summary here.
Videos
Unit Testing in Swift 2.0: The Before and After Story, with Jorge Ortiz
One of the things I mentioned in my iOSDevUK talk is that testing is one of the things that distinguish a Swift hacker from a Swift architect. As we continue building apps that are flagship products for our companies, testing in iOS is going to be a crucial advantage to moving fast in the long term.
I also want to mention that while I'm a big fan of adding tests, I agree with @catehstn that you don't have to be super dogmatic about test-driven-development as a practice. In fact, that dogmatic approach of TDD is actually scaring devs away from writing tests.
Watch this talk to check out the improvements of testing in Swift 2.0 and get a head start in writing your tests. It's really fun, I promise!
WATCH
How It Ticks: Building the Airbnb Apple Watch App
Great summary of how AirBNB went from attempting to port their iOS app onto the Apple Watch to figuring out the core value of the Watch experience, and simplifying in a game of trade-offs:
We stopped trying to port the iOS app, and started from scratch. This time, we had one very specific goal in mind: deliver the best-possible messaging experience.
The Apple Watch is very much a secondary device; a second screen, if you will, of the iPhone. Naturally, it follows that our Watch app should be just that: a lightweight extension of the Airbnb iOS app. We needed to capitalize on a targeted and important part of the Airbnb experience that embodied the on-the-go nature of the Apple Watch, and messaging fit that description perfectly.
DanielTomlinson/Watchman
@dantoml open sourced his iOSDevUK Hackathon app: Watchman - Hangman for WatchOS 2 in Swift ¯\_(ツ)_/¯
Swift Code
TKSwarmAlert - TKSwarmAlert Animated alert library like Swarm app.
DGRunkeeperSwitch - Runkeeper design switch control (two part segment control)
GEOSwift - The Swift Geographic Engine.
RateLimit - Simple utility for only executing code every so often.
DAExpandAnimation - A custom modal transition that presents a controller with an expanding effect while sliding out the presenter remnants.
Business
Basecamp 3: Work Can Wait
I love the idea of more opinionated UIs out there. It's way too easy to just go along with what everyone else is doing instead of consciously making an app that follows what you really stand for. And conversely, as we follow what everyone else is doing, we start forgetting what we stand for.
Swift Thoughts
Last week, I had the pleasure of attending, speaking, and running a Power Swift workshop at iOSDevUK in the beautiful town of Aberystwyth. Yes, I did get to ride that magical steam train in the picture!!!
For those who were unable to attend, I love this post summarizing the biggest take-aways from the conference from @oliverfoggin. Everyone has bad code, Everyone is doing it wrong, Done is better than perfect, Everyone struggles, Get to know your toolkit, Go your own way, Never stop learning, Someone can learn from what you know, You’re not alone.