xcode Cocoa Pods Shell 脚本调用错误

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

Cocoa Pods Shell Script Invocation Error

iosobjective-cxcodecocoapods

提问by hris.to

I had a project where I recently added cocoa pods. My project was signed with wildcard profile until today when I needed push notifications. I created and setup it in developer console, however now when I try to run it on physical device AFNetwork(which is added via cocoa pods) is failing with following error:

我有一个项目,我最近添加了可可豆荚。直到今天我需要推送通知时,我的项目才使用通配符配置文件进行签名。我在开发人员控制台中创建并设置了它,但是现在当我尝试在物理设备 AFNetwork(通过可可豆荚添加)上运行它时失败并出现以下错误:

mkdir -p /Users/naxex/Library/Developer/Xcode/DerivedData/Profit-ezfzeesgjrasubavzqgwnexzgbsv/Build/Products/Debug-iphoneos/Bforex (QA).app/Frameworks rsync -av --filter - CVS/ --filter - .svn/ --filter - .git/ --filter - .hg/ --filter - Headers/ --filter - PrivateHeaders/ --filter - Modules/ /Users/naxex/Library/Developer/Xcode/DerivedData/Profit-ezfzeesgjrasubavzqgwnexzgbsv/Build/Products/Debug-iphoneos/Pods/AFNetworking.framework /Users/naxex/Library/Developer/Xcode/DerivedData/Profit-ezfzeesgjrasubavzqgwnexzgbsv/Build/Products/Debug-iphoneos/Test (QA).app/Frameworks building file list ... done AFNetworking.framework/ AFNetworking.framework/AFNetworking AFNetworking.framework/_CodeSignature/CodeResources

sent 666427 bytes received 70 bytes 1332994.00 bytes/sec total size is 676284 speedup is 1.01 Code Signing /Users/naxex/Library/Developer/Xcode/DerivedData/Profit-ezfzeesgjrasubavzqgwnexzgbsv/Build/Products/Debug-iphoneos/Test (QA).app/Frameworks/AFNetworking.framework with Identity iPhone Developer: MY DEV (W8KV7Q7L6D) /usr/bin/codesign --force --sign 29B75DC1CAE41505149FC025F4F2A8B57831E975 --preserve-metadata=identifier,entitlements /Users/naxex/Library/Developer/Xcode/DerivedData/Profit-ezfzeesgjrasubavzqgwnexzgbsv/Build/Products/Debug-iphoneos/Test (QA).app/Frameworks/AFNetworking.framework 29B75DC1CAE41505149FC025F4F2A8B57831E975: no identity found Command /bin/sh failed with exit code 1

mkdir -p /Users/naxex/Library/Developer/Xcode/DerivedData/Profit-ezfzeesgjrasubavzqgwnexzgbsv/Build/Products/Debug-iphoneos/Bforex (QA).app/Frameworks rsync -av --filter - CVS/ --filter - 。 svn/ --filter - .git/ --filter - .hg/ --filter - Headers/ --filter - PrivateHeaders/ --filter - Modules/ /Users/naxex/Library/Developer/Xcode/DerivedData/Profit-ezfzeesgjrasubavzqgwnexzgbsv /Build/Products/Debug-iphoneos/Pods/AFNetworking.framework /Users/naxex/Library/Developer/Xcode/DerivedData/Profit-ezfzeesgjrasubavzqgwnexzgbsv/Build/Products/Debug-iphoneos/Test (QA).app/Frameworks 构建文件列表... 完成 AFNetworking.framework/ AFNetworking.framework/AFNetworking AFNetworking.framework/_CodeSignature/CodeResources

发送 666427 字节接收 70 字节 1332994.00 字节/秒 总大小为 676284 加速为 1.01 代码签名 /Users/naxex/Library/Developer/Xcode/DerivedData/Profit-ezfzeesgjrasubavzqgwnexzgbsv/Test-QAphonesapp /Frameworks/AFNetworking.framework with Identity iPhone Developer: MY DEV (W8KV7Q7L6D) /usr/bin/codesign --force --sign 29B75DC1CAE41505149FC025F4F2A8B57831E975 --preserve-metadata=identifier,entitlements /XcodeRiverLids/ /Profit-ezfzeesgjrasubavzqgwnexzgbsv/Build/Products/Debug-iphoneos/Test (QA).app/Frameworks/AFNetworking.framework 29B75DC1CAE41505149FC025F4F2A8B57831E975:没有找到身份失败命令退出代码/bin/sh

If I switch back to wildcard profile application runs fine on device.

如果我切换回通配符配置文件,应用程序在设备上运行良好。

Any ideas?

有任何想法吗?

Regards

问候

回答by hris.to

The problem was that I had two Provisioning Profiles with the same name. I don't know why, but CocoaPods was setting the wrong one for the frameworks. After I deleted one, CocoaPods 'caught' the right one and the builds passed.

问题是我有两个同名的配置文件。我不知道为什么,但是 CocoaPods 为框架设置了错误的框架。在我删除一个之后,CocoaPods '抓住'了正确的一个并且构建通过了。

回答by kalpesh

The solution is too simple, delete all derived data and restart your Mac. For me, It's working.

解决方法太简单了,删除所有派生数据并重新启动您的Mac。对我来说,它的工作。

回答by Sport

try this remove the workspace file and run pod install again:

尝试删除工作区文件并再次运行 pod install:

rm -rf MyProject.xcworkspace
pod install

回答by Hitendra Solanki

Try this.

尝试这个。

  1. Remove all Provisioning Profiles and install only Required one.
  2. Check if you added developer account in Xcode settings.
  3. If you are using pods, update all pods.
  1. 删除所有配置文件并仅安装必需的配置文件。
  2. 检查您是否在 Xcode 设置中添加了开发者帐户。
  3. 如果您正在使用 Pod,请更新所有 Pod。

回答by Saneesh

This one work for me

这个对我有用

remove the workspace file

删除工作区文件

rm -rf MyProject.xcworkspace

then Install pod again

然后再次安装 pod

pod install