Search code examples
xcodexcode4

How Can One Transfer Xcode 4 Code Snippets from One Machine to Another


I've got some user code snippets in my Xcode 4 which I would like to copy to another machine and share with other developers. Is there a way to do so?


Solution

  • Ah found it, they are saved at:

    ~/Library/Developer/Xcode/UserData/CodeSnippets/
    

    Each one is a plist file. In contrast to Xcode 3 there is now one file per snippet. There is no harm done in renaming them to more useful file names, Xcode will not mind. In fact, my whole CodeSnippets folder is a git repository and many devs share their favorites on github. Mine are at https://github.com/lichtschlag/Xcode-4-Code-Snippets.