Xcode 7.2 and Swift 2.1.1 Released [Updated, XCode 7.2.1]

Posted on December 8, 2015

Update 01/03/16:

XCode 7.2.1 has been released, this release it’s a maintenance release with minor fixes and stability improvements, no updated to Swift are included. Those minor fixes include:

  • xcodebuild test will no longer timeout.
  • Resolved a debugger crash that could occur when your code was depending on a binary Swift library or framework.
  • The certificates used for Apple Wallet passes, Safari Push notifications and Safari extensions have been updated.

Original XCode 7.2 Release Post:

With the new version of XCode released today a maintenance release of the Swift compiler will be also available, as expected there is nothing new regarding the language itself, only a few fixes as described in the release notes.

For more informations about what changed from the release 2.0 to 2.1.x check out this specific post and this post on Swift 2.1 Function Types Conversion: Covariance and Contravariance.

Here is a summary of the changes:

  • In previous releases of Swift, if a type had a mutable property of protocol type, chained accesses to properties of that property were always treated as mutations of the property, even if the second property was only read, not written. For example:

    protocol Countable {
      var count: Int { get }
    class MyObject {
      var widgets : Countable {
          didSet { print("in didSet") }
    var obj : MyObject = ...
    let count = obj.widgets.count

    The example above would perform a spurious write back to the property widgets, causing didSet to unexpectedly fire. The workaround was to split the access into separate expressions. For example:

    let widgets = obj.widgets
    let count = widgets.count

    This bug has now been fixed(radar 22953072).

  • Swift data types that are imported into Swift from C struct types (such as CGRect and CGPoint) can now be inspected in the debugger (radar 23088739).

  • A bug that caused some Swift projects to crash in whole module optimization with a “program too clever” LLVM error has been fixed (radar 23200656).

  • A bug has been fixed where Swift code calling an Objective-C method that took a block returning a nonnull NSString * with a Swift closure would be miscompiled, causing the compiled program to crash (radar 23285766).

Did you like this article? Let me know on Twitter!

I'm also on Twitter and GitHub.

Subscribe via RSS or email.