[英]Xcode build error “Command /usr/bin/codesign failed with exit code 1” in simulator and real environment
I recently created a new project. 我最近创建了一个新项目。 It was 8 months ago when I created the project last time. 我上次创建该项目是8个月前。 So, when I built a new project with simulator, I got an error like the following. 因此,当我使用模拟器构建一个新项目时,出现如下错误。
CodeSign {app directory}
cd {app directory}
export CODESIGN_ALLOCATE=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/codesign_allocate
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
Signing Identity: "-"
/usr/bin/codesign --force --sign - --entitlements /Users/{username}/Library/Developer/Xcode/DerivedData/{app directory}
/Users/{username}/Library/Developer/Xcode/DerivedData/{app directory}/{app name}: Is a directory
Command /usr/bin/codesign failed with exit code 1
I tried 我试过了
I tried several method. 我尝试了几种方法。 But it did not solve it. 但这并没有解决。 Most people seem to be OK in a simulation environment, but in my case it is not. 在模拟环境中,大多数人似乎都可以,但在我看来,事实并非如此。 Both the real environment and the simulation will not work. 真实环境和模拟都将无效。 Thank you. 谢谢。
The error is there in the output from the command: 该命令的输出中存在错误:
/Users/{username}/Library/Developer/Xcode/DerivedData/{app directory}/{app name}: Is a directory / Users / {用户名} / Library / Developer / Xcode / DerivedData / {应用程序目录} / {应用程序名称}:是目录
You most likely have some custom build phase or script phase which is stomping over your app's executable with a directory. 您很可能有一些自定义构建阶段或脚本阶段,这些阶段会用目录踩踏应用程序的可执行文件。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.