Sandbox: rsync.samba(6350) deny(1) file-write-create /xxx.framework/.xxx.HHb2Au

43 阅读1分钟

设置里面搜索user 把User Script Sanboxing 改为NO

image.png

Apple added a new build setting to Xcode last year, ENABLE_USER_SCRIPT_SANDBOXING, which controls whether any “Run Script” build phases will be run in a sandbox or not. From the Xcode 14 Release Notes:

苹果去年在Xcode中添加了一个新的构建设置ENABLE_USER_SCRIPT_SANDBOXING,它控制是否在沙盒中运行任何“运行脚本”构建阶段。来自Xcode 14发布说明:

You can now enable sandboxing for shell script build phases using the ENABLE_USER_SCRIPT_SANDBOXING build setting. Sandboxing blocks access to files inside the source root of the project as well as the Derived Data directory unless you list those files as inputs or outputs. When enabled, the build fails with a sandbox violation if a script phase attempts to read from or write to an undeclared dependency, preventing incorrect builds.

现在可以使用ENABLE_USER_SCRIPT_SANDBOXING构建设置为shell脚本构建阶段启用沙箱。沙箱会阻止对项目源根目录以及Derived Data目录中的文件的访问,除非您将这些文件列为输入或输出。当启用时,如果脚本阶段试图读取或写入未声明的依赖项,则构建失败并导致沙箱冲突,从而防止错误的构建。