8
votes

I had a project where I recently added cocoa pods. My project was signed with wildcard profile until today when I needed push notifications. I created and setup it in developer console, however now when I try to run it on physical device AFNetwork(which is added via cocoa pods) is failing with following error:

mkdir -p /Users/naxex/Library/Developer/Xcode/DerivedData/Profit-ezfzeesgjrasubavzqgwnexzgbsv/Build/Products/Debug-iphoneos/Bforex (QA).app/Frameworks rsync -av --filter - CVS/ --filter - .svn/ --filter - .git/ --filter - .hg/ --filter - Headers/ --filter - PrivateHeaders/ --filter - Modules/ /Users/naxex/Library/Developer/Xcode/DerivedData/Profit-ezfzeesgjrasubavzqgwnexzgbsv/Build/Products/Debug-iphoneos/Pods/AFNetworking.framework /Users/naxex/Library/Developer/Xcode/DerivedData/Profit-ezfzeesgjrasubavzqgwnexzgbsv/Build/Products/Debug-iphoneos/Test (QA).app/Frameworks building file list ... done AFNetworking.framework/ AFNetworking.framework/AFNetworking AFNetworking.framework/_CodeSignature/CodeResources

sent 666427 bytes received 70 bytes 1332994.00 bytes/sec total size is 676284 speedup is 1.01 Code Signing /Users/naxex/Library/Developer/Xcode/DerivedData/Profit-ezfzeesgjrasubavzqgwnexzgbsv/Build/Products/Debug-iphoneos/Test (QA).app/Frameworks/AFNetworking.framework with Identity iPhone Developer: MY DEV (W8KV7Q7L6D) /usr/bin/codesign --force --sign 29B75DC1CAE41505149FC025F4F2A8B57831E975 --preserve-metadata=identifier,entitlements /Users/naxex/Library/Developer/Xcode/DerivedData/Profit-ezfzeesgjrasubavzqgwnexzgbsv/Build/Products/Debug-iphoneos/Test (QA).app/Frameworks/AFNetworking.framework 29B75DC1CAE41505149FC025F4F2A8B57831E975: no identity found Command /bin/sh failed with exit code 1

If I switch back to wildcard profile application runs fine on device.

Any ideas?

Regards

5

5 Answers

16
votes

The problem was that I had two Provisioning Profiles with the same name. I don't know why, but CocoaPods was setting the wrong one for the frameworks. After I deleted one, CocoaPods 'caught' the right one and the builds passed.

5
votes

The solution is too simple, delete all derived data and restart your Mac. For me, It's working.

3
votes

try this remove the workspace file and run pod install again:

rm -rf MyProject.xcworkspace
pod install
0
votes

Try this.

  1. Remove all Provisioning Profiles and install only Required one.
  2. Check if you added developer account in Xcode settings.
  3. If you are using pods, update all pods.
-1
votes

This one work for me

remove the workspace file

rm -rf MyProject.xcworkspace

then Install pod again

pod install