Xcode: backup code snippets, breakpoints, templates and topics to cloud storage with soft links

Time:2019-11-14

Xcode: backup code snippets, breakpoints, templates and topics to cloud storage with soft links

#!/bin/bash

Backup_Path="$HOME/Library/Mobile Documents/com~apple~CloudDocs/Xcode"
Xcode_config_path="$HOME/Library/Developer/Xcode"

echo "Restoring code snippets..."
ln -s "$Backup_Path/UserData/CodeSnippets" "$Xcode_config_path/UserData"
echo "Restoring user breakpoints..."
ln -s "$Backup_Path/UserData/xcdebugger" "$Xcode_config_path/UserData"
echo "Restoring font and color themes..."
ln -s "$Backup_Path/UserData/FontAndColorThemes" "$Xcode_config_path/UserData"
echo "Restoring templates..."
ln -s "$Backup_Path/Templates" "$Xcode_config_path"
echo "All set!"

You can also use restore? Xcode? Configuration

Modify backup path and Xcode config path to the corresponding path.