A new beta means a new compiler. Check out the official release notes for more information.
- Lots of compiler crashes have been fixed.
- You can use
#if swift(>=x.y)checks to gate the use of compiler features. This should finally make it possible to have a single branch support multiple versions of Swift . . .
The bug fixes continue to come flooding in. As always, get the full details in the official release notes.
- Failable and throwing initializers can both exit before initializing all stored properties or calling
- Nested C structs now import as nested Swift structs
@objcis now valid on enums . . .
Early Christmas Present
You may have heard already but Swift is now open source! As of 9:09 AM PST the site is still choking under heavy load but the associated github repos are now public.
Grabbing the source:
brew install cmake ninja. Create a main directory to hold all the associated repos, then clone:
git clone firstname.lastname@example.org:/apple/ . . .
Supporting the Pencil
I'm happy to finally be able to share what I've been working on: supporting the Apple Pencil.
In this post I want to cover the basics of supporting
UITouchType.Stylus, some conveniences to make it easier to support iOS 8 and iOS 9.0, and a hole in the current processing of events in iOS that can make supporting the Pencil . . .
Leaks is a filthy liar
This is a blog post I started many months ago and never got around to finishing; please forgive any outdated screenshots or references. The core ideas are still relevant so I'm gonna go ahead and post it. The bug in UIKit that confused Leaks into missing the cycle was supposedly fixed but a good Software Engineer . . .
A small detour
In Xcode 7 Clang learned a new trick: Objective-C generics. Now that I've started using this feature in our legacy code I can't live without it. Even without Swift interop consequences I would still use it.
Objective-C can now declare that an
NSArray is an
NSArray<NSString *>. This helps on the . . .
Another day, another Xcode beta.
IDE & Playgrounds
- You can now set Swift Error breakpoints, including restricting the breakpoint to specific error types.
- The in-playground API has been revamped.
XCPlaygroundPage.currentPagenow grants a reference to the current page.
- The playground live view support has been . . .