Unable to archive on Xcode: CocoaPods binding error

In an iOS project, when I compile my project to run it, it works great.
But if I archive it, it fails with the following error:

ld: file not found: /Users/xxxxx/Work/xxxxx/codes/xxxxx/DerivedData/xxxxx/Build/Intermediates/ArchiveIntermediates/xxxxx/InstallationBuildProductsLocation/Applications/libPods.a clang: error: linker command failed with exit code 1 (use -v to see invocation) 

I am using Xcode 4.6 and iOS 5.0.

+6
source share
1 answer

I searched for a long time and finally got something and solved the same problem for me. For those who still need:

In build settings> Another linker flag:

Perhaps the flag is different from Debug and others.
Try changing where $(TARGET_BUILD_DIR) is $(BUILT_PRODUCTS_DIR) .

For me, I changed $(TARGET_BUILD_DIR)/libPods.a to $(BUILT_PRODUCTS_DIR)/libPods.a and the problem was resolved.

+6
source

All Articles