问题
I've been reading on "Command /usr/bin/codesign failed with exit code 1" and haven't come to solution. Has anyone familiar with this error, please I need help : (
CodeSign /Users/beetsoft/Library/Developer/Xcode/DerivedData/Unity-iPhone-bimrfbszzyhuecbvvjcicqjtcsqb/Build/Intermediates.noindex/ArchiveIntermediates/Unity-iPhone/InstallationBuildProductsLocation/Applications/plantapp.app
cd /Users/beetsoft/TIA/ARSystem/Builds/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 Distribution: pocket queries, Inc. (PXS8PN3EZZ)"
Provisioning Profile: "plantapp_dis"
(b7ae657e-8ceb-4d15-8ba3-889429c28b48)
/usr/bin/codesign --force --sign 0789673E756258B64241FC3775D466CAB50D728D --entitlements /Users/beetsoft/Library/Developer/Xcode/DerivedData/Unity-iPhone-bimrfbszzyhuecbvvjcicqjtcsqb/Build/Intermediates.noindex/ArchiveIntermediates/Unity-iPhone/IntermediateBuildFilesPath/Unity-iPhone.build/Release-iphoneos/Unity-iPhone.build/plantapp.app.xcent --timestamp=none /Users/beetsoft/Library/Developer/Xcode/DerivedData/Unity-iPhone-bimrfbszzyhuecbvvjcicqjtcsqb/Build/Intermediates.noindex/ArchiveIntermediates/Unity-iPhone/InstallationBuildProductsLocation/Applications/plantapp.app
/Users/beetsoft/Library/Developer/Xcode/DerivedData/Unity-iPhone-bimrfbszzyhuecbvvjcicqjtcsqb/Build/Intermediates.noindex/ArchiveIntermediates/Unity-iPhone/InstallationBuildProductsLocation/Applications/plantapp.app: unknown error -1=ffffffffffffffff
Command /usr/bin/codesign failed with exit code 1
回答1:
In case, if you are running on a device it gives this error because of the following reason:
The signing identity of provisioning profile you are using is Distribution profile as I can see from this error:
Signing Identity: "iPhone Distribution: pocket queries, Inc. (PXS8PN3EZZ)" Provisioning Profile: "plantapp_dis" (b7ae657e-8ceb-4d15-8ba3-889429c28b48
Distribution provisioning profiles are meant to use for archieving and distributing it to Appstore. Not for running on a device. You need to use development provisioning profile for that purpose.
You can change your provisioning profile in build settings -> code signing identity or General->Automatic code signing
回答2:
For me, updating Xcode and Mac OSX to the latest version solved the signing issues.
回答3:
CHECK
- Xcode! Check your certificate on "Target" -> "Build Setting" -> "Code Signing Identity"
- Xcode! Check your provisioning profile on "Target" -> "Build Setting" -> "Provisioning"
- Keychain! Check your certificate have private key
- Check your provisioning that create from certificate or not?
Restart Xcode Clean and Build again hope you ok
回答4:
This one worked for me:
1) Run "keychain access"
2) Select keychain with your development certificate
3) Lock it (through menu) and then unlock it
4) Voilá! It should work
来源:https://stackoverflow.com/questions/47446828/xcode-signing-failed-command-usr-bin-codesign-failed-with-exit-code-1