Saving code snippet library in xcode
Asked Answered
P

1

6

How can one save / restore user created code snippets in Xcode?

Palpebrate answered 12/9, 2011 at 14:43 Comment(0)
G
14

The user generated code snippets are saved in

~/Library/Developer/Xcode/UserData/CodeSnippets

And you can simply pass them around to save and restore them. I recommend giving them a meaningful name instead of the generated one.

I wrote a short explanation about it here, and also started a collection of useful code snippets that can be shared on github. There are still very little snippets there, so any useful snippets you have to share would be great.

Gisele answered 2/11, 2011 at 20:45 Comment(2)
I do have more code snippets in Xcode, than files in the CodeSnippet folder. Where are the rest saved?Unfeigned
These last 2 code snippets where from the versions folder /.DocumentRevisions-V100. Old versions of changed snippets where shown in Xcode (a bug).Unfeigned

© 2022 - 2024 — McMap. All rights reserved.