What's New from XCode 7, iOS 9 and Swift 2

Since WWDC 2015, there are a lot changes in iOS development world. Now the release date of next version of iOS, as well as the new iPhones is coming closer, I would like to share with you about, what is new from the IDE – XCode 7, the language – Swift 2, and finally, the OS itself – iOS 9.

XCode 7

WhatNew_XCode7

  • Now you are no longer required 99$ developer membership to run iOS apps on your device using Xcode. Additionally, Mac and iOS developer membership have been merged, the price remaining the same. It means:

Simply sign in with your Apple ID, and turn your idea into an app that you can touch on your iPad, iPhone, or Apple Watch. Download Xcode 7 beta and try it yourself today. Program membership is not required.

Good job Apple!

  • Interface Builder can render blurs and transparency.
  • Objective-C gets generics, which means collection objects like arrays, dictionaries can have specific types, just like Swift.
  • There’s a new UI class called UIStackView, similar to OS X’s NSStackView.
  • Xcode Assets Catalog: Devices won’t download assets of all sizes, only 1x, 2x or 3x depending on its traits, reducing the app size.
  • CloudKit can now be used on web too.
  • CASpringAnimation is public!
  • Apps can plug in to Safari as extensions and block content. Ad blockers incoming? Additionally, apps can populate content in Safari’s Shared Links section.
  • Developers can use SFSafariViewController, which has shared cookies, auto fill and other features from Safari.
  • UIPickerView can be resized to any size. No more ugly transform hacks.
  • iOS apps can show a text field in notifications, which was previously restricted to Messages.
  • Contacts can be finally accessed via an object oriented API, as opposed to the earlier C API.
  • Calling API methods not available on minimum deployment target causes a compile time error. We need new structure for conditional checking.
  • UICollectionView got a lot of new methods to support interactively moving items
  • There’s a new UIFieldBehavior in UIKit Dynamics that lets you model vector force fields. Examples of it include gravity, electric or magnetic fields etc.
  • Playgrounds are also updated with many features, as well as support for UI testing.
  • Crash logs can be viewed and download right from XCode.

Swift 2

Swift 2 brings a lot of functionality, including:

New error handling model

An advanced error handling model provides clear, expressive syntax for catching and throwing errors. It’s also easy to create your own custom error types so you can describe error cases with clear, meaningful names. The new error model was designed to work seamlessly with NSError and the Cocoa frameworks. Error handling code now looks like:

func loadData() throws { }

func test() {
  do {
    try loadData()
  } catch {
    print(error)
  }
}

Syntax improvements

  • Powerful control flow with do, guard, defer, and repeat
  • Keyword naming rules unified for functions and methods
  • Protocol extensions and default implementations
  • Extended pattern matching to work in if clauses and for loops

And much more!

iOS 9

WhatNew_iOS9

No need to talk too much in iOS 9, some improvements can be listed right now:

  • Low Power Mode to squeeze extra battery life
  • Automatically organize your selfies in Photos
  • The sophisticated new San Francisco font
  • An intuitive Shift key on keyboard
  • Go back to previous apps with tiny, new Back button
  • Sharing content into Notes
  • Siri’s gotten a lot smarter
  • Search in Settings
  • Drive, walk or take public transportation on Maps
  • Improved Spotlight
  • Easy editing of long chunks of text on iPad
  • Integration with Apple Watch Activity achievements
  • News app, with amazing contents and articles
  • Slide Over, Picture-in-picture makes multi-tasking more awesome on iPad

And that it, let’s wait to see what Apple will bring us in next few days, in their upcoming event!