简体   繁体   English

在模拟器和实际环境中,Xcode生成错误“命令/ usr / bin / codesign失败,退出代码为1”

[英]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 我试过了

  • Confirm Xcode sign-in status 确认Xcode登录状态
  • Check Automatically manage signing 选中自动管理签名
  • Clean up and delete build DerivedData 清理并删除构建DerivedData
  • Reboot Xcode and PC 重新启动Xcode和PC
  • Reinstall Podfile and cocoapod 重新安装Podfile和cocoapod
  • Recreate certificate 重新创建证书
  • xattr -c xattr -c

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.

相关问题 Xcode签名失败命令/ usr / bin / codesign失败,退出代码为1 - Xcode Signing Failed Command /usr/bin/codesign failed with exit code 1 命令/ usr / bin / codesign失败,退出代码为1 Xcode CocoaPods - Command /usr/bin/codesign failed with exit code 1 Xcode CocoaPods xcode 6.1命令/ usr / bin / codesign失败,退出代码为1 - xcode 6.1 Command /usr/bin/codesign failed with exit code 1 Xcode 命令 /usr/bin/codesign 失败,退出代码为 1:errSecInternalComponent - Xcode Command /usr/bin/codesign failed with exit code 1 : errSecInternalComponent 代码签名错误 - 命令/ usr / bin / codesign失败,退出代码为1 - Code Sign Error - Command /usr/bin/codesign failed with exit code 1 命令/ usr / bin / codesign失败,退出代码为1? - Command /usr/bin/codesign failed with exit code 1? 命令/ usr / bin / codesign失败,退出代码为5 - Command /usr/bin/codesign failed with exit code 5 命令 /usr/bin/codedesign 失败,退出代码为 1 - Command /usr/bin/codesign failed with exit code 1 命令/ usr / bin / codesign失败,退出代码为1 - Command /usr/bin/codesign failed with exit code 1 xcode9-ionic3项目中的代码签名错误,命令/ usr / bin / codesign失败,退出代码为1 - xcode9 - Code Sign Error in ionic3 project,Command /usr/bin/codesign failed with exit code 1
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM