How can one save / restore user created code snippets in Xcode?
Saving code snippet library in xcode
Asked Answered
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.
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.