ios 命令 /bin/sh 失败,退出代码为 1 和嵌入式 pods 框架

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/37591358/
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-08-31 09:14:18  来源:igfitidea点击:

Command /bin/sh failed with exit code 1 and Embedded pods framework

iosxcodeswiftalamofirecode-signing

提问by Gaurav Pandey

Not able to identified actual issue, During updating coco pod getting a message "Re-creating CocoaPods due to major version update." (that was come only once) and pod updation is successful. After on build i am getting the error. Command /bin/sh failed with exit code 1. Below is some detail also which i am getting

无法识别实际问题,在更新 coco pod 期间收到消息“由于主要版本更新而重新创建 CocoaPods。”(仅出现一次)并且 pod 更新成功。在构建后,我收到错误消息。命令 /bin/sh 失败,退出代码为 1。下面是我得到的一些细节

  1. Code Signing /Users/Gaurav/Library/Developer/Xcode/DerivedData/Appname-******/Build/Products/Debug-iphoneos/Appname.app/Frameworks/Alamofire.framework with Identity iPhone Developer: Account Name (Account Id)
  2. /usr/bin/codesign --force --sign ***************** --preserve-metadata=identifier,entitlements "/Users/UserName/Library/Developer/Xcode/DerivedData/Appname-***************/Build/Products/Debug-iphoneos/Appname.app/Frameworks/Alamofire.framework"
  3. /Users/Username/Library/Developer/Xcode/DerivedData/Appname-************/Build/Products/Debug-iphoneos/Appname.app/Frameworks/Alamofire.framework: bundle format unrecognized, invalid, or unsuitable
  1. Code Signing /Users/Gaurav/Library/Developer/Xcode/DerivedData/Appname-******/Build/Products/Debug-iphoneos/Appname.app/Frameworks/Alamofire.framework with Identity iPhone Developer: Account Name (Account Id)
  2. /usr/bin/codesign --force --sign ***************** --preserve-metadata=identifier,entitlements "/Users/UserName/Library/Developer/Xcode/DerivedData/Appname-***************/Build/Products/Debug-iphoneos/Appname.app/Frameworks/Alamofire.framework"
  3. /Users/Username/Library/Developer/Xcode/DerivedData/Appname-************/Build/Products/Debug-iphoneos/Appname.app/Frameworks/Alamofire.framework: bundle format unrecognized, invalid, or unsuitable

I'm using iOS 8 as deployment target and Xcode 7.3.1 I have checked code signing identity that doesn't have any issue. I have reinstall again all pod and Alamofire also but not abel to identified issue.

我使用 iOS 8 作为部署目标和 Xcode 7.3.1 我已经检查了没有任何问题的代码签名身份。我也重新安装了所有 pod 和 Alamofire,但没有发现问题。

回答by Evgenii Vandyshev

Clean the project, and deleting the derived data (~/Library/Developer/Xcode/DerivedData/) fixed it for me

清理项目,并删除派生数据(~/Library/Developer/Xcode/DerivedData/)为我修复它

回答by parth

If it was complaining about a particular Pod and being unable to codesign it.

如果它抱怨某个特定的 Pod 并且无法对其进行协同设计。

Below things work for me:

下面的事情对我有用:

  1. Select the Pods Project In the main editor window, select the Pod in the targets dropdown
  2. Under the general tab, and under the identity header, click choose Info.plist file
  3. Select the plist file for the Pod
  1. 选择 Pods 项目在主编辑器窗口中,在目标下拉列表中选择 Pod
  2. 在常规选项卡下,在身份标题下,单击选择 Info.plist 文件
  3. 选择 Pod 的 plist 文件

The project should now build. For some reason, it seems to lose this setting, or not be able to reference it's own plist file.

该项目现在应该构建。出于某种原因,它似乎丢失了这个设置,或者无法引用它自己的 plist 文件。

Not 100% sure but I hope it helps someone.

不是 100% 肯定,但我希望它可以帮助某人。

回答by Alex Ostroushko

I have the same issue. It happen after updating cocoaPods, so I just downgrading it and all works fine. I think we just need to wait for a new version of cocoaPods and for now you can use old version. How to downgrade cocoaPods

我有同样的问题。它发生在更新 cocoaPods 之后,所以我只是将它降级,一切正常。我认为我们只需要等待 cocoaPods 的新版本,现在您可以使用旧版本。 如何降级 cocoaPods