在
Xcode中,更改文件>中的设置.工作区设置…分别为每个Xcode用户存储.我希望为所有用户设置工作区设置相同.我的目标是将构建的目标复制到同一个相对目录中.
默认情况下,工作区设置存储在:
[WorkspaceName].xcworkspace/xcuserdata/[UserName].xcuserdatad
解决方法
我们最终编写了一个小的bash脚本,它执行了四个默认的写命令来设置正确的设置
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"