Error for ios app: Command /usr/bin/codesign failed with exit code 1

ⅰ亾dé卋堺 提交于 2019-12-05 22:58:33

问题


I have a Ionic3 app for IoS. Until yesterday I was able to open the .xcodeproj in xcode9 and upload the app to my iphone. I have no idea what went wrong but now I get this error "Command /usr/bin/codesign failed with exit code 1" and can not upload the application to phone (using cable) or archive it.

My technologies:

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

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

global packages:

cordova (Cordova CLI) : 6.4.0 

local packages:

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

System:

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 

More details about my error:

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

What shall I do in this situation? Do I have to make additional setup in the my Apple developer account or to change something in xcode?

Thanks a lot.


回答1:


Thanks for the answer. I've tried Clean and Build but didn't solve the errors. Somehow I figure it out that the problem was the Keychain access. I had to rewrite the password as described here https://support.apple.com/ro-ro/HT201609




回答2:


Lately I'd been getting the

/usr/bin/codesign failed with exit code 1

error more and more frequently (Xcode 9). Every time I added a file or even a method or function, codesign would fail. It was easy to fix by manually throwing away the build folder in '~Library/Developer/Xcode/Derived Data' but I was getting really tired of having to do that every few hours.

As soon as I opened the Keychain Access, I noticed that I had two Developer certificates of the same name, one of which was expired. I threw out the expired certificate and that fixed it. I've since added two files, but not a peep from codesign.



来源:https://stackoverflow.com/questions/46969370/error-for-ios-app-command-usr-bin-codesign-failed-with-exit-code-1

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!