April 25th, 2018
Apple deprecated the Core Animation instrument in Xcode 9.3. If you’re looking for the debug options the Core Animation instrument had, use Xcode’s view debugger. Choose Debug > View Debugging > Rendering to access the debug options.
April 17th, 2018
I released my latest book, Version Control for iOS and Mac Developers. It’s a free download. Go to the book’s website to download it.
April 13th, 2018
A common question I see on Apple developer forums is what version of Xcode can be used with a particular version of macOS. The Xcode Releases site provides the answer to this question.
Xcode Releases lists every Xcode version Apple has ever released along with operating system requirements and download links. As you can see from the website:
March 27th, 2018
I’ve recently seen multiple questions online from people having problems committing to git because the git repository had a detached head. This article answers the most common questions about detached heads.
A detached head in a git repository occurs when the repository has no current branch.
A detached head isn’t a problem until you commit some changes. If you commit changes with a detached head, the new commit exists, but it will not appear in any branch’s commit history. The only way to access a commit from a detached head is to memorize the commit number. Git commit numbers are long, random hexadecimal numbers, making them difficult to remember.
Checking out a specific commit is the most common way to detach the head from a git repository.
Check out a local branch. The branch you check out will become the current branch, the attached head of the repository.
To checkout a local branch in Xcode, open the source control navigator by choosing View > Navigators > Show Source Control Navigator.
Notice the long hexadecimal number number next to the SpriteKitGitDemo folder in the screenshot. That number is the commit number. The fact that there’s a commit number instead of a branch name next to the folder means the repository has a detached head.
The local branches are inside the Branches folder. Click the disclosure triangle to show them.
Select a branch, right-click, and choose Checkout to check out the branch.
March 12th, 2018
Something that can happen to you when using version control is you commit a change to the version control repository, realize you made a mistake, and want to go back to an earlier commit. How do you do this in Xcode?
Xcode provides no direct way to go back to an earlier commit. What you have to do is create a branch off the earlier commit and work off that branch.
Open the source control navigator by choosing View > Navigators > Show Source Control Navigator. Select the current branch from the source control navigator. The Xcode editor shows all the commits for that branch.
Select the commit you want to use, right-click, and choose Branch from CommitNumber. The commit number is a long hexadecimal number. Name the branch and click the Create button. Now you’re working from the earlier commit.