In Xcode, changing settings in File > Workspace Settings... are stored for each Xcode user separately. I want workspace settings to be set the same for all users. My goal it to have the built targets to be copied in the same relative directory.
By default workspace settings are stored in:
[WorkspaceName].xcworkspace/xcuserdata/[UserName].xcuserdatad
I want the ability make this shared across all users so I can add it to version control.
Go to Source Control in Xcode and select Projectname -- master, then Configure... In the Address field, paste the Git clone URL for your repo copied in the previous step. Select Add Remote, then select Done to finish creating the origin remote for your local Git repo.
As mentioned in "Git XCode - change origin ", you simply can change the remote origin url, using git remote set-url (or in your case, rename+add). If that private repo is empty, you can push to the full history of your cloned repo.
xcodeproj file, yes, you should include it in your repository.
We ended up writing a small bash script that performed four default write commands to set the correct settings
scriptPath="$(dirname "$0")"
cd "$scriptPath"
fullPath=$(pwd)
settingsFile="$fullPath"/<project>.xcworkspace/xcuserdata/$USER.xcuserdatad/WorkspaceSettings.xcsettings
cp -f "$settingsFile" "$settingsFile.plist"
defaults write "$settingsFile" BuildLocationStyle CustomLocation
defaults write "$settingsFile" CustomBuildLocationType RelativeToWorkspace
defaults write "$settingsFile" CustomBuildProductsPath "Build/Products"
defaults write "$settingsFile" CustomBuildIntermediatesPath "Build/Intermediates"
cp -f "$settingsFile.plist" "$settingsFile"
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