Sharing Xcode Snippets across Computers

If you, like me, use Xcode snippets to speed up your coding, and, you routinely work on at least two different computers, you probably want to be able to have those snippets available to you on all of your computers.

Well, you can share your XCode Snippets across different computers using whatever shared folder you have access to like iCloud or Dropbox and crearte a smiling.

You can move your snippents folder from the Xcode UserData folder which is in the ~/Library/Developer/Code folder to a shared location on iCloud Drive (or you could use Dropbox if that is yoru prefererence) and then create a symbolic link in that Developer location back to to that new location.

Here are some terminal commands that I use to do that.

Primary Computer

  1. Create a folder in your iCloud Drive documents folder. (You can also do that manually in any location)

    • I am creating a folder called MyXcodeSnippets
  1. Move your Xcode Snipets from the current location to the new iCloud Drive Location. Again, you can do this manually as well
  1. Use the terminal command to make a symbolic link back to that original folder. The command is

Here is the command that will link new MyXcodeSnippets Folder to the Xcode developer location

Secondary Computers

Now on every other computer that you have, where you have access to that shared folder, all you need to do is

  1. DELETE the existing code snippets folder either manually or by this terminal command
  1. Add Symbolic Link (Step 3 above)

Symbolic Link