I am getting this error
/Users/macbook/Library/Developer/Xcode/DerivedData/xxxxx-egjyfcyhdfcgftavbtoudbcgthja/Build/Products/Debug-iphoneos/xxxx.app: unknown error -1=ffffffffffffffff
command /usr/bin/codesign failed with exit code 1
with xcode 9.1/ios11.1 while building the application, earlier i was able to run my application smoothly. Any idea what could be the issue. I have already tried following steps:
Deleting all the Derived Data.
update all provisioning profile and certificates.
But still no luck.
Try updating your keyChain password. For that try following
If you don't know your old password, the solution is to create a new
login keychain.
If you know your old password, use that password to update your existing login keychain:
- Open the Keychain Access app, which is in the the Utilities folder of your Applications folder.
- From the list of keychains on the left side of the window, select "login."
- From the Edit menu in the menu bar, choose “Change Password for Keychain 'login.'”
- Enter the old password of your user account in the Current Password field.
- This is the password you were using before the password was reset.
- Enter the new password of your user account in the New Password field. This is the password you're now using to log in to your Mac. Enter the same password in the Verify field.
Click OK when done, then quit Keychain Access. Quit your Xcode, reopen the project and try building your project it should work.
This started happening to me in Xcode 9, along with a host of other keychain-related problems (I'm on 9.3 and it just happened today). Sometimes the automatic code signing just spontaneously goes afoul for me and I start getting an errSecInternalComponent
error along with the codesign failed with exit code 1
.
What has consistently worked is to go into Xcode -> Preferences -> Accounts
, go to Manage Certificates...
and use the plus sign to add the certificates I need, even if it looks like there are perfectly good one's already present. I don't know why these certificates would be any different, but... they just work.
I changed my Mac's general login password and it worked.
I encountered this problem a few times over the past month and it was always right after I had imported some .png files into Xcode. I was able to recreate the error repeatedly if I imported a .png file that was exported from Illustrator using the "Save for Web" which did not including the resolution meta data that is read by Xcode. (screenshot attached)
But, if I exported the file using the "Export As" setting in Illustrator, set the resolution to 144px, and then imported it into Xcode, the error would disappear. (screenshot attached)
Just make sure to delete the images without the resolution listed and you will hopefully be good to go!