Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cocoa Pods Shell Script Invocation Error

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

like image 585
hris.to Avatar asked Jul 06 '15 12:07

hris.to


3 Answers

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.

like image 77
hris.to Avatar answered Oct 29 '22 21:10

hris.to


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

like image 23
kalpesh Avatar answered Oct 29 '22 20:10

kalpesh


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

rm -rf MyProject.xcworkspace
pod install
like image 20
Sport Avatar answered Oct 29 '22 22:10

Sport