Xcode 9: New Build System

September 21st, 2017

Filed under: Xcode | Be the first to comment!

Xcode 9 provides a preview of a new build system that has been built from scratch in Swift. The new build system is supposed to be faster and more reliable.

To use the new build system in one of your projects, you must enable the new build system for that project. Choose File > Project Settings to open the project settings sheet. Choose New Build System from the Build System menu under Shared Project Settings.


I didn’t notice much of a difference using the new build system, but I don’t have any huge projects that take forever to build with the old build system.


Xcode 9: Cocoa Xib File Projects Return

September 19th, 2017

Filed under: Cocoa, Mac Development, Xcode | Be the first to comment!

Xcode 8.3 removed the Use Storyboards checkbox for new Cocoa application projects. The checkbox has returned in Xcode 9 so you can choose whether to use storyboards or xib files for your project’s user interface.


Xcode 9: Swift Refactoring

September 18th, 2017

Filed under: Xcode | Be the first to comment!

Xcode 9 adds Swift refactoring support, something Swift developers have been asking for since Swift’s introduction. Choose Editor > Refactor to access the refactoring options. Xcode 9 has the following refactoring options:

  • Rename
  • Extract function
  • Extract method
  • Extract variable
  • Extract all occurrences
  • Add missing abstract class overrides
  • Add missing protocol requirements
  • Add missing switch cases
  • Convert to switch statement
  • Expand default
  • Generate missing function definitions
  • Wrap in NSLocalizedString

I haven’t had the chance to use the refactoring tools much so I can’t provide more detailed information on the Swift refactoring options. You can find more information on Swift refactoring in the following article on the Swift language website:

Swift Local Refactoring


Xcode 9: Improved GitHub Support

September 15th, 2017

Filed under: Version Control, Xcode | Be the first to comment!

Xcode 9 makes it easier to work with GitHub. Start by adding your GitHub account to Xcode. Go to Xcode’s Accounts preferences, click the Add button, and choose GitHub to add your GitHub account.

Once you add your GitHub account to Xcode, you can go to any GitHub repository and clone the project in Xcode by clicking the Clone or download button and clicking the Open in Xcode link. You have to be logged into GitHub for the Open in Xcode link to be available.

You can learn more about Xcode 9’s improved GitHub support by watching the following WWDC video:

GitHub and the New Source Control Workflows in Xcode 9


Xcode 9: Source Control Navigator

September 13th, 2017

Filed under: Version Control, Xcode | Be the first to comment!

Xcode moved the branching version control operations to the source control navigator, whose button is next to the project navigator.


The source control navigator shows your local branches, tags, and remote branches. Selecting a branch shows the commit history for the branch. Double-clicking a commit shows the changes you made in that commit. Select a commit, right-click, and choose Checkout to revert your repository to that commit.

Branching Operations

To create a new branch, select the branch where you want to base the new branch, right-click, and choose Branch from. A sheet will open for you to name the branch.

To switch to a branch, select the branch, right-click, and choose Checkout.

To create a tag, select a branch, right-click, and choose Tag. A sheet will open for you to name the tag and supply a tag message.

To delete a branch, select it, right-click, and choose Delete. You cannot delete the current branch.

Merging branches involves a branch you select from the source control navigator and the current branch. Select a branch that’s not the current branch and right-click. The contextual menu that opens has items to merge the selected branch into the current branch and merge the current branch into the selected branch.