S Link
Migrating to Swift for iOS Developers
5-day class for iOS developers: Migrate your own Obj-C app to Swift, and explore new iOS 8 features. First class led by Homebrew pro developer Max Howell.
Swift Around the Web
Swift Initialization and the Pain of Optionals
This is an incredibly detailed analysis of the problems (and several unsatisfying solutions!) with Swift initialization. I'm personally on board with @ColinEberhardt when it comes to avoiding force unwrapping optionals in all cases. However, another part of me definitely prefers to be strict about using constants instead of variables. It's a tough problem that I hope Apple will fix in future versions of Swift!
CocoaPods Is Ready for Swift
Yay! "CocoaPods 0.36 is just around the corner and it will include support for Swift Pods. While a public release is still some time away, you can use CocoaPods unreleased code to start integrating Swift libs in your projects right now. Just be cautious, that this is not fully tested code and treat it as a stopgap measure till 0.36 comes out."
Secret of Swift Performance
Measure: “about 20% of your app code takes up to 80% of run speed. It means that it’s important to find that 20% part of code that is heavy and improve it..." Good to know!
Look under the hood: Learn how to Compile Swift code, Disassemble it, and Analyze Assembly code! You can learn and discover many interesting thing by looking on it.
Coding
How to build a custom (and “designable”) control in Swift
I love how the new IBDesignable lets us hand over the design power to the designers. And it's a super cool way to create controls to use across multiple apps.
The Trials and Tribulations of Writing a 3rd Party iOS Keyboard
I personally use SwiftKey as my custom keyboard on iOS8 and I've definitely seen the issues as outlined in this post... Good to keep in mind that it's an iOS issue if you do decide to build your own custom keyboard.
Apple News
WatchKit
"WatchKit apps have two parts: A WatchKit extension that runs on iPhone and a set of user interface resources that are installed on Apple Watch. When your app is launched on Apple Watch, the WatchKit extension on iPhone runs in the background to update the user interface and respond to user interactions. WatchKit provides three opportunities to extend your iPhone app to Apple Watch: WatchKit apps, Glances, and actionable notifications."
Make sure to watch the video for a lot more detail!
Apple Watch Human Interface Guidelines
"A Watch app complements your iOS app; it does not replace it. If you measure interactions with your iOS app in minutes, you can expect interactions with your Watch app to be measured in seconds. So interactions need to be brief and interfaces need to be simple."
WatchKit Programming Guide
"Apple Watch requires the presence of an iPhone to run third-party apps. Creation of a third-party app requires two separate executables: a Watch app that runs on Apple Watch and a WatchKit extension that runs on the user’s iPhone. The Watch app contains only the storyboards and resource files associated with your app’s user interface. The WatchKit extension contains the code for managing the Watch app’s user interface and responding to user interactions. With those two executables, you can support different types of user interactions on Apple Watch"
Lister (for Apple Watch, iOS, and OS X)
"Lister is a document based productivity app for iOS 8, OS X 10.10, and Apple Watch. It demonstrates Apple Watch integration; using iCloud to share content between multiple app targets and platforms; using App Groups to share local content between apps and extensions on a single device; creating App Extensions to provide Today Widgets and Watch Apps; and defining a framework to share common code between multiple targets. The Lister sample app is provided in both Swift and Objective-C."
Design
Apple Watch resolutions and other interesting tidbits disclosed in developer tools
This is a great overview of the design details to consider now that we have a lot more clarity of what WatchKit entails.
iPhone 6 Plus Pixel Peeping
"the iPhone 6 Plus renders things differently than every other iOS device to date. To developers, the device exposes a screen rectangle of 414 × 736 points, which the system renders at 3× scale into a backing store of 1242 × 2208 “logical” pixels.1 Since the iPhone 6 Plus display has only 1080 × 1920 hardware pixels, the backing store image is then downsampled by approximately 13% to the native resolution in an additional step."
Sweat the Details: Animation and Microinteractions in Mobile Apps
"Microinteractions are, despite their small size and near-invisibility, incredibly important. The difference between a product you love and a product you tolerate is often the microinteractions you have with it. They can make our lives easier, more fun, and just more interesting if done well." - Dan Saffer
Other Cool Stuff
LittleBigDetails
This site points out the tiny user interaction details from apps. I love how happy these make me :)
In Case You Missed It
WatchKit, WatchKit, WatchKit!
So I might have gone a little overboard in covering WatchKit. It's just sooooo exciting, I couldn't stop myself. A lot more to come, but hope you enjoy my discoveries so far as I've been learning WatchKit:
HealthKit: Getting Fitness Data
This is the last installment in my series about HealthKit as we’re approaching the New Year and the release of the WATCH, especially the Sports edition. Here is where I cover the heart of HealthKit – getting your user’s health data.
Tutorials
WatchKit Tutorial with Swift: Getting Started
Take a Bitcoin price tracking app, and make a Watch App that goes along with it.
Videos
Watch Hackathon Live
You can watch all the videos from this weekend's WatchKit Hackathon! I highly recommend watching the ones from the Workshops especially:
- WatchKit Workshop Session 1: WatchKit App, Notifications, Glances & more
- WatchKit Workshop Session 2: Advanced WatchKit Tips, Tables, Menu & more
Brooklyn Swift Developers Meetup Presenters
Videos, Slides, and Source Code from previous presenters at the Brooklyn Swift Developers Meetup!
WATCH
Hello WatchKit! Learn how to build an Apple Watch app
Great walkthrough of WatchKit and building a Stock Watch App with Glances and Notifications included.
"Probably the most important elements of all of this are glances and notifications. Of course the main interface will be important, but I just visualize the other areas really owning the experiences most people take advantage of on the device."
jblocksom/WristComms
One of the WatchKit challenges I haven't gotten to just yet is fully understanding how to share data between my iOS app and Watch App Extension. WristComms by @jblocksom is an example of using app groups and a user defaults suite for the host app and extension to access the same data store. You can view the video of the talk that goes with this code on YouTube here.
Sharing data between iOS apps and app extensions
This is a great outline of how to share data with your Watch App Extension. Hint: use App Groups and NSFileCoordinator.
Swift Thoughts
WATCHKIT!!!!!!!!!!! It's officially out, and I honestly couldn't help but start testing it out right away. This weekend, I attended the world's first WatchKit Hackathon, and it was incredible to see what everyone built in such a short time.
The app that impressed me most was the Design winner - AudioKit, an app that encourages you to keep your heart rate in your target zone by slowing down and speeding up music when you're no longer in your target BPM zone. And of course, who can resist the audience favorite - Fart Watch !
I can't wait to see what we all build with a little more time and resources :)