<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Tewha.net</title>
    <link>https://tewha.net/tags/dropbox/</link>
    <description>Recent content on Tewha.net</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en-us</language>
    <lastBuildDate>Wed, 18 Jul 2012 14:00:00 +0000</lastBuildDate>
    <atom:link href="https://tewha.net/tags/dropbox/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>How to sync Xcode 4’s key bindings and code snippets</title>
      <link>https://tewha.net/2012/07/how-to-sync-xcode-4s-key-bindings-and-code-snippets/</link>
      <pubDate>Wed, 18 Jul 2012 14:00:00 +0000</pubDate>
      <guid>https://tewha.net/2012/07/how-to-sync-xcode-4s-key-bindings-and-code-snippets/</guid>
      <description>&lt;p&gt;You can use Dropbox to synchronize Xcode 4’s key bindings, code snippets, named tabs, and font &amp;amp; color schemes. If you don’t have a Dropbox account yet, &lt;a href=&#34;http://db.tt/ht6NoXF8&#34;&gt;you can sign up here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The secret is &lt;em&gt;symlinks&lt;/em&gt;. These are different from the aliases you can create in Finder, so you’ll need to do this in the shell.&lt;/p&gt;
&lt;p&gt;The problem with this is that Xcode 4 will not follow symlinks. Luckily, Dropbox will. (Note, however, that Dropbox will &lt;strong&gt;not&lt;/strong&gt; follow aliases.)&lt;/p&gt;</description>
      <content:encoded><![CDATA[<p>You can use Dropbox to synchronize Xcode 4’s key bindings, code snippets, named tabs, and font &amp; color schemes. If you don’t have a Dropbox account yet, <a href="http://db.tt/ht6NoXF8">you can sign up here</a>.</p>
<p>The secret is <em>symlinks</em>. These are different from the aliases you can create in Finder, so you’ll need to do this in the shell.</p>
<p>The problem with this is that Xcode 4 will not follow symlinks. Luckily, Dropbox will. (Note, however, that Dropbox will <strong>not</strong> follow aliases.)</p>
<p>On your first computer:</p>
<ol>
<li>Quit Xcode.</li>
<li>Create a directory for your sync on Dropbox. I use <code>~/Dropbox/Sync</code>. In it, I have a subdirectory for Xcode.</li>
<li>Move Xcode’s UserData directory to your Dropbox:<br>
<code>mv ~/Library/Developer/Xcode/UserData ~/Dropbox/Sync/Xcode/UserData</code></li>
<li>Let Dropbox upload everything.</li>
<li>Pause Dropbox’s syncing.</li>
<li>Move them back to where Xcode stores them:<br>
<code>mv ~/Dropbox/Sync/Xcode/UserData ~/Library/Developer/Xcode/UserData</code></li>
<li>Create a symbolic link from your UserData to DropBox:<br>
<code>ln -s ~/Library/Developer/Xcode/UserData ~/Dropbox/Sync/Xcode/UserData</code></li>
<li>Resume Dropbox syncing.</li>
<li>Relaunch Xcode.</li>
</ol>
<p>On any other computer:</p>
<ol>
<li>Quit Xcode.</li>
<li>Let Dropbox download everything, if it hasn’t yet.</li>
<li>Pause Dropbox syncing.</li>
<li>Remove your local Xcode user data:<br>
<code>rm -R ~/Library/Developer/Xcode/UserData</code></li>
<li>Move your UserData from Dropbox to Xcode:<br>
<code>mv ~/Dropbox/Sync/Xcode/UserData ~/Library/Developer/Xcode/UserData</code></li>
<li>Create a symbolic link from your UserData to DropBox:<br>
<code>ln -s ~/Library/Developer/Xcode/UserData ~/Dropbox/Sync/Xcode/UserData</code></li>
<li>Resume Dropbox syncing.</li>
<li>Relaunch Xcode.</li>
</ol>
<p>You can also synchronize your Archives directory, using the same technique.</p>
<p>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.</p>]]></content:encoded>
    </item>
  </channel>
</rss>
