[Xcode] Xcode Code Snippets : Sync on your devices

less than 1 minute read

Create a Snippet on Xcode

  • Create


  • Edit (Command + Shift + L)


Sync the code snippets using the iCloud Drive

  • Code snippets path
  • Copy the code snippets to the iCloud Drive
$ mkdir ~/Library/Mobile\ Documents/com~apple~CloudDocs/XcodeUserData

$ mv -v /Users/{USERNAME}/Library/Developer/Xcode/UserData/CodeSnippets ~/Library/Mobile\ Documents/com~apple~CloudDocs/XcodeUserData
  • Link the code snippets with your devices
$ rm /Users/{USERNAME}/Library/Developer/Xcode/UserData/CodeSnippets

$ ln -s ~/Library/Mobile\ Documents/com~apple~CloudDocs/XcodeUserData/CodeSnippets /Users/{USERNAME}/Library/Developer/Xcode/UserData/


Leave a comment