xcode 命令 /usr/bin/codesign 失败,退出代码为 1

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

Command /usr/bin/codesign failed with exit code 1

xcodeios

提问by iosfreak

I am trying to test a app on my phone. I keep getting this error:

我正在尝试在手机上测试应用程序。我不断收到此错误:

Command /usr/bin/codesign failed with exit code 1

I have added the Provisioning profile and went through the set up on the apple iPhone portal.

我已经添加了 Provisioning 配置文件并完成了在 Apple iPhone 门户上的设置。

I have been looking at this for a little over an hour and a half and I still can't figure it out.

我已经看了这个半小时多一点,但我仍然无法弄清楚。

Any ideas why this isn't working and why I am getting this error? Thanks!

任何想法为什么这不起作用以及为什么我收到此错误?谢谢!

Edit:

编辑:

Here's some information on my build:

以下是有关我的构建的一些信息:

CodeSign build/Debug-iphoneos/TableView.app
cd "/flashPics_iPhone BACKUP 2:27"
setenv PATH "/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
setenv _CODESIGN_ALLOCATE_ /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/codesign_allocate
/usr/bin/codesign -f -s "iPhone Developer: Coulton Vento (LVEE98KDSF)" "--resource-rules=/flashPics_iPhone BACKUP 2:27/build/Debug-iphoneos/TableView.app/ResourceRules.plist" --entitlements "/flashPics_iPhone BACKUP 2:27/build/TableView.build/Debug-iphoneos/TableView.build/TableView.xcent" "/flashPics_iPhone BACKUP 2:27/build/Debug-iphoneos/TableView.app"

/flashPics_iPhone BACKUP 2:27/build/Debug-iphoneos/TableView.app: object file format invalid or unsuitable
Command /usr/bin/codesign failed with exit code 1

采纳答案by Ajay

This is a good resource in figuring out how to setup the provisioning: http://mobiforge.com/developing/story/deploying-iphone-apps-real-devices

这是弄清楚如何设置配置的好资源:http: //mobiforge.com/developing/story/deploying-iphone-apps-real-devices

You must download the provisioning profile, the certificate and make sure your iPhone's UDID is registered on those accounts. Then for the Distribution profile you need to specifically tell it in it's setting to use a Distribution Profile to make it build it.

您必须下载配置文件、证书并确保您的 iPhone 的 UDID 已在这些帐户中注册。然后对于分发配置文件,您需要在它的设置中专门告诉它使用分发配置文件来构建它。

Edit: Under Project Settings > Select the Configuration your using (Debug, Release, or Distribution) and make sure under Code Signing your Profile appears there.

编辑:在项目设置下 > 选择您使用的配置(调试、发布或分发),并确保在代码签名下您的配置文件出现在那里。

回答by nlg

I fixed that error. The steps are:

我修复了那个错误。步骤是:

  1. GOTO project
  2. select Edit Project setting
  3. in genatel tab project Format select your current Compatible Xcode version and select based SDK for your currunt iPhone Device; for example (iphone device 4.0) then...
  1. 转到项目
  2. 选择编辑项目设置
  3. 在 genatel 选项卡项目格式中选择您当前的兼容 Xcode 版本并为您当前的 iPhone 设备选择基于 SDK;例如(iphone设备4.0)然后......

build tab:

构建选项卡:

configuration : Distribution

配置:分布

Base SDK : choose your latest xcode SDK Device

基础 SDK:选择您最新的 xcode SDK 设备

Code signing identity : choose your provisional portal that you alredy created in iPhone Devloper center and you installed so select that particular provisioning.

代码签名标识:选择您已经在 iPhone Devloper 中心创建并安装的临时门户,以便选择该特定配置。

Any iPhone OS Device : select same as Code signing identity (as mentioned above)

任何 iPhone 操作系统设备:选择与代码签名身份相同(如上所述)

Then next step is go scrolling at below that find Product Name

然后下一步是在下面滚动找到产品名称

Product Name : give Product name exactly same as your prodoct name. That's it.

产品名称:提供与您的产品名称完全相同的产品名称。就是这样。

Follow the same steps in configuration :Debug and Release

在配置中遵循相同的步骤:调试和发布