October 19th, 2018
I want to let you know about a new site I launched, Swift Dev Journal. Swift Dev Journal has articles to help iOS and Mac developers create apps in Swift.
None of the blog posts here are moving. Regarding future writing, longer articles and tutorials about iOS and Mac development will be on Swift Dev Journal. This blog will contain tips and shorter articles, such as the changes in new versions of Xcode, as well as articles that wouldn’t fit at Swift Dev Journal.
October 1st, 2018
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.
September 27th, 2018
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.
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:
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.
September 20th, 2018
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.
September 17th, 2018
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.