简体   繁体   中英

XCode 9.2 - iOS - Archive production app fails on codesign with unknown error

Just a few weeks ago I had no problem archiving and uploading my app. Now suddenly I am getting /usr/bin/codesign failed with exit code 1 and most troubling is this is the reason:

unknown error -1=ffffffffffffffff

Most people who have this issue I've seen have more helpful error messages. Perhaps something in Apple's system has changed, because nothing has changed on my end and all my certificates are good until next year. Any insight would be greatly appreciated.

Here's the full error output:

CodeSign /Users/USERNAME/Library/Developer/Xcode/DerivedData/THE_APP-gmiiqepwfsfeorbketgcgewghlil/Build/Intermediates.noindex/ArchiveIntermediates/THE_APP/InstallationBuildProductsLocation/Applications/THE_APP.app
    cd /Users/USERNAME/ots/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: ___________ (_________)"
Provisioning Profile: "iOS Team Provisioning Profile: ______________"
                      (______________________)

    /usr/bin/codesign --force --sign XXXXXXXXXXXXXXXXXXXXXX--entitlements /Users/USERNAME/Library/Developer/Xcode/DerivedData/THE_APP-gmiiqepwfsfeorbketgcgewghlil/Build/Intermediates.noindex/ArchiveIntermediates/THE_APP/IntermediateBuildFilesPath/THE_APP.build/Release-iphoneos/THE_APP.build/THE_APP.app.xcent --timestamp=none /Users/USERNAME/Library/Developer/Xcode/DerivedData/THE_APP-gmiiqepwfsfeorbketgcgewghlil/Build/Intermediates.noindex/ArchiveIntermediates/THE_APP/InstallationBuildProductsLocation/Applications/THE_APP.app



/Users/USERNAME/Library/Developer/Xcode/DerivedData/THE_APP-gmiiqepwfsfeorbketgcgewghlil/Build/Intermediates.noindex/ArchiveIntermediates/THE_APP/InstallationBuildProductsLocation/Applications/THE_APP.app: unknown error -1=ffffffffffffffff
Command /usr/bin/codesign failed with exit code 1

I changed my login password for my laptop last week and that seems to be the reason codesign was failing. It seems xcode had stored my old password and was trying to use it with codesign and then silently failing.

What I did was lock all my keychains (login was open) and change their passwords. I then closed and re-opened xcode and this time it requested my keychain passwords (which it didn't before) and then I was able to successfully archive my app.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM