iosxcodecertificateprovisioning-profile

Xcode Command /usr/bin/codesign failed with exit code 1 : errSecInternalComponent


I am trying to add new provisioning profile to my Xcode, to test an app on the device. Here are the steps I followed:

  1. Deleted all certificates and provisioning profiles

  2. Create/Add IOS Dev Certificate

  3. Add My IOS Device Online

  4. Create IOS Provisioning Profile

  5. Add IOS Provisioning Profile

  6. Clean App

  7. Build Then Run App

  8. Set Codesigning nd Provisioning Profile In Build Settings

  9. Lots of Googling > to no successes

Here is the error I get:

CSSM_SignData returned: 800108E6
/Users/alexpelletier/Library/Developer/Xcode/DerivedData/MyExpense-efnqzvoqwngzcmazaotyalepiice/Build/Products/Debug-iphoneos/MyExpense.app:     errSecInternalComponent
Command /usr/bin/codesign failed with exit code 1

Solution

  • Open Keychain Access, then in the File menu select Lock All Keychains.

    Then go back to Xcode and clean and rebuild. It will prompt you for your password again to unlock the keychain.

    After this, assuming you have no other compile issues, it will succeed!