【问题标题】:Error for ios app: Command /usr/bin/codesign failed with exit code 1ios 应用程序错误:命令 /usr/bin/codesign 失败,退出代码为 1
【发布时间】:2018-04-08 17:23:15
【问题描述】:

我有一个适用于 IoS 的 Ionic3 应用程序。直到昨天我才能够在 xcode9 中打开 .xcodeproj 并将应用程序上传到我的 iphone。我不知道出了什么问题,但现在我收到此错误“命令 /usr/bin/codesign 失败,退出代码 1”并且无法将应用程序上传到手机(使用电缆)或存档。

我的技术:

cli 包:(/usr/local/lib/node_modules)

@ionic/cli-utils  : 1.15.2
ionic (Ionic CLI) : 3.15.2

全局包

cordova (Cordova CLI) : 6.4.0 

本地包

@ionic/app-scripts : 2.1.3
Cordova Platforms  : android 6.0.0 ios 4.3.1
Ionic Framework    : ionic-angular 3.6.0

系统

ios-deploy : 1.9.0 
ios-sim    : 6.1.2 
Node       : v7.3.0
npm        : 3.10.10 
OS         : macOS Sierra
Xcode      : Xcode 9.0.1 Build version 9A1004 

有关我的错误的更多详细信息:

CodeSign /Users/macbook/Library/Developer/Xcode/DerivedData/HelloCordova-bsbygjyhdfcgftavbtgwrsqhgdkb/Build/Products/Debug-iphoneos/HelloCordova.app

cd /Users/macbook/ionic/componentaalex3/platforms/ios
export CODESIGN_ALLOCATE=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/codesign_allocate
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"

Signing Identity:     "iPhone Developer: Alex Claudiu (xxxxxxxxxxxx)"
Provisioning Profile: "iOS Team Provisioning Profile: *" (32d4f44b-xxxxxxxxxxxx.........................)

/usr/bin/codesign --force --sign 0E9C82C58EED8DD6B6F1DAF2709E5714F67E568B --entitlements 
/Users/macbook/Library/Developer/Xcode/DerivedData/HelloCordova-bsbygjyhdfcgftavbtgwrsqhgdkb/Build/Intermediates.noindex/HelloCordova.build/Debug-iphoneos/HelloCordova.build/HelloCordova.app.xcent --timestamp=none 
/Users/macbook/Library/Developer/Xcode/DerivedData/HelloCordova-bsbygjyhdfcgftavbtgwrsqhgdkb/Build/Products/Debug-iphoneos/HelloCordova.app

/Users/macbook/Library/Developer/Xcode/DerivedData/HelloCordova-bsbygjyhdfcgftavbtgwrsqhgdkb/Build/Products/Debug-iphoneos/HelloCordova.app: unknown error -1=ffffffffffffffff

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

在这种情况下我该怎么办?我是否必须在我的 Apple 开发者帐户中进行额外设置或更改 xcode 中的某些内容?

非常感谢。

【问题讨论】:

  • 你试过清理和构建吗?

标签: ios xcode9


【解决方案1】:

最近我得到了

/usr/bin/codedesign 失败,退出代码为 1

错误越来越频繁(Xcode 9)。每次我添加文件甚至方法或函数时,代码设计都会失败。通过手动丢弃“~Library/Developer/Xcode/Derived Data”中的构建文件夹很容易修复,但我真的厌倦了每隔几个小时就必须这样做。

当我打开钥匙串访问时,我注意到我有两个同名的开发者证书,其中一个已过期。我扔掉了过期的证书并修复了它。我已经添加了两个文件,但没有从 codesign 窥视。

【讨论】:

    【解决方案2】:

    感谢您的回答。我试过 Clean and Build 但没有解决错误。不知何故,我发现问题出在钥匙串访问上。我必须按照此处所述重写密码https://support.apple.com/ro-ro/HT201609

    【讨论】:

    • 这绝对有帮助!
    猜你喜欢
    • 2017-03-02
    • 2011-12-08
    • 2014-12-24
    • 2014-03-27
    • 2014-07-24
    • 2011-05-28
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多