Swift Around the Web
Swift: Playground documentation of doom
I have personally gone through the pain of adding pretty code documentation into my playgrounds via tiny HTML files, so I cannot be more excited to find out that in Xcode 6.3 beta 2, you can easily add rich text documentation using the new and simple //: and /*: delimiters! There is also a fun Playground Markup Format you can use. To view your new rich tech comments in your playground, go to Editor -> Show Documentation as Rich Text in your Xcode menu. Enjoy!
A Sanatorium for Swift Generics
"In Objective-C, protocols are mostly used to loosely couple objects—for example, a UITableView doesn’t need to know the precise type of its data source, just that it conforms to UITableViewDataSource. In Swift, however, protocols hierarchically build functionality by adding capabilities to types bit by bit. The sprawling protocol hierarchy of Int isn’t a sign of addled language designers run amok, but of a deep and powerful type system."
Coding
NSPredicate Cheatsheet
If you've ever been confused how to use NSPredicate to create the specific query you need (I know I have!), this is definitely a handy page to bookmark. There's even a PDF version included!
Swift Natural Language Processing Playground
Last week, @ayanonagon gave a really great talk (slides here) about Natural Language Processing in Swift at the SLUG Meetup. One big thing I learned about was the NSLinguisticTagger - a really simple way to do very complex things with text in iOS (see the Design section below for some amazing possibilities for this!). This is the playground to get you started with it. Also make sure to check out @ayanonagon's open source project Parsimmon for more fun.
Apple News
Design
Futures of text
This is getting a lot closer to the world in Her (an excellent must-watch movie if you haven't seen it yet). I just downloaded Lark, the app mentioned in this post, and am extremely impressed by the beautiful text-based onboarding process. Looking forward to more Apps as Personas.
Chronicons
Icons crafted specifically for use in the WATCH context menu that are also fully compliant with WatchKit's Human Interface Guidelines. You can get all of them for $10 or a few free ones by providing your email.
Other Cool Stuff
In Case You Missed It
Architecting Your App for WatchKit with Natasha Murashev (Video)
My talk about sharing data between your iOS and WatchKit app is officially up! Some things to note:
Using the NSFileCoordinator API is not actually safe as I found out from @stephenpoletto as a result of my talk. You can read more about it in my blog post here.
@balestrapatrick pointed out that you can also listen to NSUserDefaultsDidChangeNotification to be notified when something in the App Group changes. Check out his included example code.
@kostiakoval has an example for sharing Core Data between the iOS and Watch App, which I did not cover in my talk.
Tutorials
Local Notifications in iOS 8 with Swift (Part 1)
A good time to brush up on Local Notifications, since they're supposed to work with the WATCH. I don't think anyone has gotten them to actually work with WatchKit on the Simulator, but we'll know a lot more in only a few hours! You can find Part 2 here.
Functional Voodoo
Implementing React.js in Swift
"React takes a novel and in some respects surprising approach to UI development. The framework is deeply functional and focusses on immutability and reducing complexity. This should cause any Swift developer to take interest!"
Configuration Values
A clean and very Swifty approach to dealing with configuring of views by grouping related properties together in a struct.
WATCH
The Apple Watch Is Time, Saved
"Here’s a tidbit you might not know — in order to receive notifications from apps, the Watch must be on your wrist and locked. The Watch requires contact with your skin to receive notifications. There will be no in-app dropdown notifications or constant pinging while it’s off your wrist. Push notifications also cease when the battery reaches 10 percent. Those decisions speak to the care with which Apple is handling notifications."
AILW: Adding a Touch of Liveliness
@_DavidSmith walks through adding a beautiful and very lively animation to a bar graph in his WatchKit app. Hopefully it works just as smoothly on the hardware as it does on the simulator...
WatchAware
A long list of WatchKit apps developers are making for the WATCH. Great for inspiration and most importantly, to increase your excitement about the possibilities of this brand new platform.
Swift Code
Kinder - Finally, Tinder for cats!
SwiftEventBus - SwiftEventBus is a publish/subscribe EventBus optimized for iOS
KGFloatingDrawer - A floating navigation drawer with an interesting animated presentation written in Swift.
RNLoadingButton-Swift - An easy-to-use UIButton subclass with an activity indicator
Persei - Animated top menu for UITableView / UICollectionView / UIScrollView written in Swift
Swift Thoughts
Happy #springforward!!!!!!! Only a few more hours left before time really changes....
Meanwhile, I wanted to share something else that got me extra excited this week - Pay. So I've used Pay in physical stores a few times, but honestly it takes me almost the same effort as pulling out my credit card.
I still have to pull something out of my pocket, and right now, because I'm so conditioned to use my credit card, that's what I automatically reach for. I've found I have to make a conscious choice to use Pay. Usually I see the logo for it at the register, get excited, put away my credit card that I already have out, and use my phone instead. Maybe that'll change once Pay comes to the WATCH or in the exciting future when I don't have to carry my wallet with me everywhere.
But now onto the exciting part. I've used several newer apps this week where Pay was an option, and the experience was truly magical. I downloaded the app and was able to make a purchase without having to pull out my credit card and try to input all the information about it on the go. The experience of having my credit card information already there and ready to go in an app I just downloaded when I needed it most has been truly magical. That to me is where all the value of Pay shines brightly.
So if you're a developer making an app that includes a purchasing option, I really hope you take advantage of integrating the Pay SDK - a little easy magic your customers will be very grateful for.