What's new in Xcode 8? [Updated to 8.1, 8.2 and 8.3]

Xcode is the complete developer toolset used to create apps for Apple TV, Apple Watch, iPad, iPhone, and Mac. The Xcode development environment bundles the Instruments analysis tool, Simulator, and the OS frameworks in the form of tvOS SDKs, watchOS SDKs, iOS SDKs, and macOS SDKs.

Jump to "What's new in Xcode 8.1?"
Jump to "What's new in Xcode 8.2?"
Jump to "What's new in Xcode 8.3?"

Swift 3

Xcode 8 supports Swift 3 as well as Swift 2.3. A Swift migrator is provided to help upgrade your Swift code to the latest Swift 3 language specifications and SDK requirements.

All projects created with Xcode 8 use by default Swift 3. You can use legacy swift language version (Swift 2.3).

Signing

Now Xcode can manage signing for you automatically. Xcode will automatically create and update profiles, app IDs, and certificates. Every project created with Xcode by default enable automatically signing.

Interface Builder

Xcode have new adaptive UI development tools and workflow.
Image Source - Apple

Source Editor

Source Editor Extensions - Now you can created native Xcode source editor extension. Xcode 8 have native template to builds an Xcode Source Editor that allow you to add commands to interact with the Xcode source editor.

Code completion for images - Xcode 8 have native support for image name completion.

Jump Bar - Clicking the Jump Bar, located at the top of every editor pane, you can quickly select what information to view in the Assistant editor.

Debugging

Memory Debugging - Xcode 8 also have memory debugging feature which show how memory assigning to every object with a nice graphical representation.

Runtime issues - while debugging appear in the issue navigator, similar to compile-time issues:

  • Leaks issues identify potential leaked memory detected during debugging sessions.
  • Thread sanitizer issues identify threading-created race conditions on data changes at runtime.
  • View debugging issues identify constraints conflicts.

Documentation

The new documentation format looks gorgeous and the documentation browser is fast and easy to use.


Upated 1 (What's new in Xcode 8.1?)

1. Interface Builder Updates

  • Added Custom Gesture Recognizer to the object library. Use it for custom subclasses of UIGestureRecognizer or NSGestureRecognizer instead of a plain NSObject. This resolves an issue where a combination of stock and custom gesture recognizers on a UIView fails to compile.

  • There is a new Update Frames button at the bottom of the canvas. Click the button to update the frames of the selected objects and their children on the Interface Builder canvas.

  • And yes, the Pin button at the bottom of the canvas has been renamed to Add New Constraints.

2. Touch Bar APIs

  • Xcode 8.1 supports Touch Bar for Macs that include it, and supports adding Touch Bar functionality to your app.
  • Before using Touch Bar functionality in your app, confirm that the app is running on a macOS version that includes support for Touch Bar using a runtime check.

    For example, the following Objective-C code performs a runtime check to make sure NSTouchBar is available:

    NSClassFromString(@"NSTouchBar") != nil
    

    In Swift code, do an availability check for macOS 10.12.1, and a runtime check for Touch Bar class availability. For example:

    NSClassFromString("NSTouchBar") != nil
    

And too many issues resolved.


Upated 2 (What's new in Xcode 8.2?)

1. Touch Bar

  • Xcode 8.2 offers more Touch Bar actions and allows customizing the Touch Bar controls of the following editors and debuggers: source editor, Playground editor, Interface Builder, view debugger, and memory graph debugger. To customize the Touch Bar, open the desired editor and then choose View > Customize Touch Bar.
  • Touch Bar API is available for macOS 10.12.2 or later.

2.Simulator

  • Dragging an app onto a Simulator window installs the app.
  • You can take videos and screenshots of Simulator using the xcrun Xcode command-line utility. To take a screenshot, run the command

    xcrun simctl io booted screenshot. 
    

    To take a video, run the command

    xcrun simctl io booted recordVideo <filename>.<file extension>
    

And again too many issues resolved.

Update 3 (What's new in Xcode 8.3?)

1. Deprecation and Removal Notices

  1. Xcode 8.3 no longer supports Swift 2.3. You can migrate your projects containing Swift 2.3 code to Swift 3 syntax by opening the project and choosing Edit > Convert > To Current Swift Syntax.
  2. The Automation instrument has been removed from Instruments. You need to use Xcode’s UI Testing in its place.
  3. The -exportFormat parameter of the -exportArchive option for xcodebuild has been removed. To set the export format, use the -exportOptionsPlist parameter to specify an export plist file with the method key set to the desired format. For more information on the keys and values for the export plist, run xcodebuild -help on the command line.

2. Build System

  1. The Mac will no longer sleep when a build is in progress.
  2. Scheme pre-action and post-action scripts now set the environment variable TARGET_DEVICE_IDENTIFIER to the UDID of the selected run destination device.
  3. Xcode no longer crashes when the build system copies a file with an invalid code signature.
  4. xcodebuild no longer hangs when invoked with a project or workspace containing no schemes.

3. Core Data

  1. When manually generating code for Core Data entities, generated Objective-C code properly uses ClassName+CoreDataClass.h rather than just ClassName.h in #import directives.
  2. Passing -showBuildSettings to xcodebuild for a project containing a Core Data model should no longer result in xcodebuild hanging.

4. FileMerge

The FileMerge application now uses the same text infrastructure as Xcode. File navigation and syntax coloring are more consistent with Xcode.

5. Instruments

Updated the Instruments user interface.

6. Organizer

  1. The Xcode Organizer now supports exporting tvOS apps for Enterprise distribution.
  2. Speed improvements have been made to the Organizer window. Opening the Organizer with many Archives and many iTunes Connect Products should open quickly.

7. Projects

Fixed an issue which caused Xcode to warn about Swift 2.3 deprecation even when the Use Legacy Swift Language Version setting is set to NO. Error -

"Use Legacy Swift Language Version” (SWIFT_VERSION) is required to be configured correctly for targets which use Swift. Use the [Edit > Convert > To Current Swift Syntax…] menu to choose a Swift version or use the Build Settings editor to configure the build setting directly.

8. Provisioning

Changed the user interface for managing signing certificates and provisioning profiles. Certificates are managed from the Accounts preferences pane by selecting a team and clicking Manage Certificates. Automatically managing signing is recommended, however if your app requires manually signing provisioning profiles are managed in the General tab of the project editor. Use the Provisioning Profile dropdown to import or download profiles. In addition it displays profiles that match the current signing configuration of the target.

9. Simulator

  1. The simctl get_app_container command can now return the path of an app's data container or App Group containers.
  2. The simctl tool of the xcrun command line tool has two new commands that provide additional information for filing bug reports.
    • simctl logverbose enables verbose logging on the specified device.
    • simctl diagnose collects all relevant Simulator logs on the host and on the device, and then packages them into an archive that can be attached to bug reports.
      For more information, see the help for each command by running xcrun simctl help on the command line.
  3. You can invoke Siri using Hardware > Siri after enabling Siri in the Settings app on Simulator.

10. Testing

  1. Added the XCUISiriService class to XCTest used for writing tests which activate Siri with a voice recognition string, and for queries for elements in the Siri UI. Use the class to write UI tests for Intents and Intents UI extensions.
  2. Added XCUIKeyModifierCapsLock as a preferred alternative for XCUIKeyModifierAlphaShift. This is consistent with the addition of NSEventModifierFlagCapsLock in macOS 10.12, as a preferred alternative for NSAlphaShiftKeyMask.
  3. XCTest adds new APIs to simplify writing asynchronous tests.

11. Swift Compiler

The Swift compiler can now automatically precompile Objective-C bridging headers, which can speed up Debug configuration builds (or other non-WMO builds) of mixed-source projects with large bridging headers. This feature is still experimental, and is disabled by default but can be enabled with the "Precompile Bridging Header" (SWIFT_PRECOMPILE_BRIDGING_HEADER) build configuration setting within Xcode.



Related Article