~/Library/Developer/Xcode/userData/CodeSnippets directory to my other computer under the same directory,but it doesn't work.~/Library/Developer/Xcode/userData,but I didn't found CodeSnippets directory.
- Lastly, I used xcode10 to create a Code Snippet on my other computer, and go to
~/Library/Developer/Xcode/userData,but I didn't found CodeSnippets directory.The reason why you weren't able to locate CodeSnippets directory on your other computer might be due to the directory been hidden.
Import/Export Custom Snippets
We can find our custom code snippets at the path ~/Library/Developer/Xcode/UserData/CodeSnippets/.
Since Library is a hidden folder, we can either open this path with the terminal command:
open `~/Library/Developer/Xcode/UserData/CodeSnippets/`
Or you can let the Finder shows the hidden files with the terminal command:
defaults write com.apple.Finder AppleShowAllFiles true && killall Finder
If you want to hide again the hidden files:
defaults write com.apple.Finder AppleShowAllFiles false && killall Finder
Every time we add/remove files in this folder, we must restart Xcode.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With