Xcode 9 - Alamofire Pods。命令 /bin/sh 失败,退出代码为 1
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/47617037/
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
Xcode 9 - Alamofire Pods. Command /bin/sh failed with exit code 1
提问by Matrosov Alexander
/Users/Alex/Library/Developer/Xcode/DerivedData/MyProject-ehabmnclpzlywhabrefntacibonm/Build/Intermediates.noindex/ArchiveIntermediates/Fuego/InstallationBuildProductsLocation/Applications//MyProject.app/Frameworks/Alamofire.framework: unknown error -1=ffffffffffffffff
Command /bin/sh failed with exit code 1
I got this issue when I Archive my project. When I run app on simulator it works ok without such issue above.
我在归档项目时遇到了这个问题。当我在模拟器上运行应用程序时,它可以正常工作,没有上述问题。
Also it works ok with Xcode 8
, but now when I try to Archive it on Xcode 9
I have this issue. But maybe this is not the case as I reinstall Mac OS
from scratch, so it maybe cocopods version issue I am not sure.
它也适用于Xcode 8
,但是现在当我尝试将其存档时,Xcode 9
我遇到了这个问题。但也许情况并非如此,因为我Mac OS
从头开始重新安装,所以我不确定可能是 cocopods 版本问题。
Also two //
here in the example above is also strange for me /Applications//MyProject.app
//
上面例子中的两个也对我来说很奇怪/Applications//MyProject.app
回答by Duan Nguyen
I believe it's a Xcode's bug. Restart your Mac and try to build again. Xcode would ask permission to access your Keychain before build Alamofire, then just allow it.
我相信这是 Xcode 的错误。重新启动您的 Mac 并尝试再次构建。Xcode 会在构建 Alamofire 之前请求访问您的钥匙串的权限,然后允许它。
回答by Matrosov Alexander
Hm it's very strange after some search on the Web I found that this is actually signing issue.
嗯,在网上搜索后,我发现这实际上是签名问题,这很奇怪。
I used Xcode to generate new distribution certificate and maybe this leads some problems for me.
我使用 Xcode 生成新的分发证书,这可能会给我带来一些问题。
What I did to solve my issue.
我做了什么来解决我的问题。
- I removed all certificates on my Mac and in my apple account.
- I removed all prov profiles as well on my Mac and in my apple account.
- I requested certificate and save it on the disc manually (not via Xcode )
- I recreated certificate and profile. Downloaded it manually and double click on it.
- After that I faced with keychain issue when I can not enter password to allow signing my certificate. I use this linkto move certificate form login to system section.
- Finally I get it work.
- 我删除了 Mac 和 Apple 帐户中的所有证书。
- 我也删除了 Mac 和 Apple 帐户中的所有 prov 配置文件。
- 我申请了证书并将其手动保存在光盘上(不是通过 Xcode )
- 我重新创建了证书和配置文件。手动下载并双击它。
- 之后,当我无法输入密码以允许签署我的证书时,我遇到了钥匙串问题。我使用此链接将证书表单登录移动到系统部分。
- 最后我得到它的工作。