You can use Dropbox to synchronize Xcode 4’s key bindings, code snippets, named tabs, and font & color schemes. If you don’t have a Dropbox account yet, you can sign up here.
The secret is symlinks. These are different from the aliases you can create in Finder, so you’ll need to do this in the shell.
The problem with this is that Xcode 4 will not follow symlinks. Luckily, Dropbox will. (Note, however, that Dropbox will not follow aliases.)
On your first computer:
- Quit Xcode.
- Create a directory for your sync on Dropbox. I use
~/Dropbox/Sync
. In it, I have a subdirectory for Xcode. - Move Xcode’s UserData directory to your Dropbox:
mv ~/Library/Developer/Xcode/UserData ~/Dropbox/Sync/Xcode/UserData
- Let Dropbox upload everything.
- Pause Dropbox’s syncing.
- Move them back to where Xcode stores them:
mv ~/Dropbox/Sync/Xcode/UserData ~/Library/Developer/Xcode/UserData
- Create a symbolic link from your UserData to DropBox:
ln -s ~/Library/Developer/Xcode/UserData ~/Dropbox/Sync/Xcode/UserData
- Resume Dropbox syncing.
- Relaunch Xcode.
On any other computer:
- Quit Xcode.
- Let Dropbox download everything, if it hasn’t yet.
- Pause Dropbox syncing.
- Remove your local Xcode user data:
rm -R ~/Library/Developer/Xcode/UserData
- Move your UserData from Dropbox to Xcode:
mv ~/Dropbox/Sync/Xcode/UserData ~/Library/Developer/Xcode/UserData
- Create a symbolic link from your UserData to DropBox:
ln -s ~/Library/Developer/Xcode/UserData ~/Dropbox/Sync/Xcode/UserData
- Resume Dropbox syncing.
- Relaunch Xcode.
You can also synchronize your Archives directory, using the same technique.
This technique is not perfect, as Xcode will probably not recognize changes while running. However, it is better than having to manually copy these directories between computers.