4

I'm attempting to build an iOS project that uses SDWebImage which is imported via Cocoapods. The project builds just fine for the Simulator, but when selecting an actual iOS device I'm met with this error:

Run custom shell script '[CP] Embed Pods Frameworks':

Code Signing <path_to>/DerivedData/FooBar-uuid/Build/Products/Debug-iphoneos/FooBar.app/Frameworks/SDWebImage.framework with Identity iPhone Developer: Parrotmac (XXXXXXXXX)
/usr/bin/codesign --force --sign <HEX_IDENTIFIER_HERE>  --preserve-metadata=identifier,entitlements "<path_to>/DerivedData/FooBar-uuid/Build/Products/Debug-iphoneos/FooBar.app/Frameworks/SDWebImage.framework"
<path_to>/DerivedData/FooBar-uuid/Build/Products/Debug-iphoneos/FooBar.app/Frameworks/SDWebImage.framework: unknown error -1=ffffffffffffffff
Command /bin/sh failed with exit code 1</code>

I've tried:

  • Cleaning the project from Xcode
  • Deleting Pods/, Podfile.lock and FooBar.xcworkspace then re-running pod install
  • Deleting DerivedData
  • Adding then removing my developer account from Xcode
  • Installing Cocoapods version 1.1.1 manually (then recreating everything with pod install).
  • Unlocking my Keychain

But I'm at a complete loss of what to do. This SO Question seems similar, but there are no answers.

In the event it matters, I'm using macOS 10.12.4 (Beta) and Xcode 8

Community
  • 1
  • 1
isaacparrot
  • 1,918
  • 17
  • 24
  • [This also seems similar](http://stackoverflow.com/questions/41451502/xcodebuild-error-seckey-api-returned-25308), so maybe have a look. – l'L'l Feb 01 '17 at 04:23

1 Answers1

1

This is what worked for me:
1. Open keychain tool
2. Unlock 'login' keychain
3. Unlock 'system' keychain. Lock it again.
You'll be prompted with the following message, enter your password.

enter image description here That's it. Go back to Xcode and have fun!

AmitP
  • 5,353
  • 4
  • 35
  • 27