CocoaPods frameworks: codesign is trying to use a code signing identity I've deleted

1.8k Views Asked by At

I'm running into a bizarre and frustrating issue trying to code sign frameworks added by CocoaPods. Basically my situation is this: towards the start of this project I was using a development certificate called iPhone Developer: Foo (EPVVKCMTUU), but I've since deleted that item from the keychain and added a new certificate called iPhone Developer: Bar (2GET2WP9BU).

Now whenever I try to build my project, CocoaPods seems to be trying to use that old, deleted identity to code sign frameworks instead of the newly added one. When it reaches the Embed Pod Frameworks step, it errors out with the following output:

Code Signing /Users/rpowell/Library/Developer/Xcode/DerivedData/iOSProject-drvqqtwgdezwyfcchhsckmxcddzs/Build/Products/Debug-iphoneos/iOSProject.app/Frameworks/Argo.framework with Identity iPhone Developer: Foo (EPVVKCMTUU)
/usr/bin/codesign --force --sign 9326811E6F54C4459C0C05A802F7557419C426E0 --preserve-metadata=identifier,entitlements /Users/rpowell/Library/Developer/Xcode/DerivedData/iOSProject-drvqqtwgdezwyfcchhsckmxcddzs/Build/Products/Debug-iphoneos/iOSProject.app/Frameworks/Argo.framework
9326811E6F54C4459C0C05A802F7557419C426E0: no identity found
Command /bin/sh failed with exit code 1
1

There are 1 best solutions below

0
rpowell On

I solved my own issue! The problem was that the original certificate hadn't been removed from the provisioning profile I was using. I deleted the developer ID in the provisioning portal, regenerated the provisioning profile, and now it works.