xcode 修复命令 /bin/sh 失败,退出代码为 1

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/35507586/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 08:33:49  来源:igfitidea点击:

Fixing Command /bin/sh failed with exit code 1

iosxcodeswift

提问by

That the error xcode appear:

出现错误xcode:

enter image description here

在此处输入图片说明

I had already tried that question no helpful:

我已经尝试过这个问题没有帮助:

Code Sign Error - Command /usr/bin/codesign failed with exit code 1

代码签名错误 - 命令 /usr/bin/codesign 失败,退出代码为 1

I'm trying to upload an App from a not mine account. I've imported the profile to Xcode.

我正在尝试从非我的帐户上传应用程序。我已将配置文件导入 Xcode。

I've the .mobileprovision for distribution and .p12 certificate already imported.

我已经导入了用于分发的 .mobileprovision 和 .p12 证书。

But when I try to archive I get the above error. How can I fix it?

但是当我尝试存档时,出现上述错误。我该如何解决?

回答by Pandurang Yachwad

As stated above, cleaning Derived folder, clean and Archive helps. If nothing helps, follow most common solution for computer science problem - Restart the MacBook and try again. It did work for me.

如上所述,清理派生文件夹、清理和存档有帮助。如果没有任何帮助,请遵循计算机科学问题的最常见解决方案 - 重新启动 MacBook 并重试。它确实对我有用。

回答by louyizhidu

~/Library/MobileDevice/Provisioning Profiles

~/Library/MobileDevice/Provisioning Profiles

Remove all old files, re-install the new profile,set the right profiles in

删除所有旧文件,重新安装新配置文件,在

code signing/provisioning profiles

代码签名/配置文件

回答by Ali Adil

Man there is no issue with your code or pod files , i had face the same issue and the solution was to choose the right provisioning profile of my app

伙计,您的代码或 pod 文件没有问题,我遇到了同样的问题,解决方案是为我的应用程序选择正确的配置文件

go to build settings --- code signing and under provisioning profile make sure that u chooed the right 1

转到构建设置 --- 代码签名并在配置文件下确保您选择了正确的 1

BR

BR