Xcode 10: Projects Use New Build System

October 1st, 2018

Filed under: Xcode | Be the first to comment!

In Xcode 10 projects use the new build system by default. If you want to use the legacy build system in a project, choose File > Project Settings. Choose Legacy Build System from the Build System menu.

Xcode 10: See Changed Code in Editor

September 27th, 2018

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

If your Xcode project is under version control, Xcode’s editor highlights the changes you make to the code. When you add or change code, Xcode places a blue bar on the left edge of the editor.


Clicking the blue bar opens a popover to discard the change. For some reason you can’t commit changes from the editor. You can only discard changes.

If you remove code, there may be a blue dot instead of a blue bar in the editor. Click the dot to discard the change and restore the code you removed.

Other Bar Colors

The blue bar on the left side of the editor window is the most common color you’ll see. But Xcode also has the following color bars for source control changes:

  • A gray bar indicates changes you committed locally but did not push to a remote repository.
  • A blue outline indicates upstream changes, changes someone else working on the project made.
  • A red bar indicates the changes you made conflict with upsream changes.


If you do not see colored bars on the left side of the editor, you may need to turn on showing source control changes from Xcode’s Source Control preferences.


Make sure the Show Source Control changes checkbox is selected. Select the Include upstream changes checkbox to see upstream changes in the editor.

Xcode 10: Improved Bitbucket and GitLab support

September 20th, 2018

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

Xcode 10 improves version control support for Bitbucket and GitLab. You can add your Bitbucket and GitLab accounts to Xcode from Xcode’s Accounts preferences.


Click the Add button to add an account. A sheet opens.


Choose Bitbucket Cloud to add your Bitbucket account. Choose GitLab.com to add your GitLab account.

Starting in Xcode 10 you can add your Xcode project to Bitbucket or GitLab from Xcode. Open the Source Control navigator by choosing View > Navigators > Show Source Control Navigator. Select the Remotes folder, control-click, and choose Create Remote. A sheet opens.


Choose your account from the Account menu. Click the Create button to add your project to Bitbucket or GitLab.

Xcode 10: Library Moved to Toolbar

September 17th, 2018

Filed under: Xcode | Be the first to comment!

In Xcode 10 the Library, where you access things like code snippets and user interface elements, is no longer in the lower right portion of the project window. The button to access the Library has been moved to the right side of the toolbar, next to the buttons to show the various editors.


Click the Library button to open the Library in a separate window. Option-clicking the Library button keeps the window open, which helps a lot when you’re building your app’s user interface.

The specific library that opens depends on the file you’re currently viewing/editing. If you’re in a source code file, clicking the Library button will open the code snippets library. If you’re in a xib file or storyboard, clicking the Library button will open the object library that contains the UI elements.

Supporting Dynamic Type in iOS Text Views

September 10th, 2018

Filed under: iOS Development | Be the first to comment!

Dynamic Type on iOS lets people adjust the size of text to make text easier to read. Someone with poor eyesight can use larger text if the app supports Dynamic Type.

You can support Dynamic Type in your iOS app without writing any code. You have to do the following things:

  • Use plain text in the text view.
  • Tell the text view to support Dynamic Type in Interface Builder.
  • Choose a Dynamic Type text style as the text view’s font.

You can perform all these tasks from the attributes inspector in Interface Builder. Select your text view from the storyboard or xib file.


To use plain text in the text view, choose Plain from the Text menu.

Select the Dynamic Type checkbox to support Dynamic Type. If you build your project at this point, you will most likely get the following warning in Xcode:

Automatically Adjusts Font requires using a Dynamic Type text style

Text views in iOS Xcode projects initially use the system font, which does not support Dynamic Type. You must change the font to use a Dynamic Type text style. Click the button on the right side in the Font text field to open a popover to change the font.


Use the Font menu to select a text style. There’s a Text Styles group of menu items. Choose one of them as the font for the text view to support Dynamic Type.