Introduction: Archiving application for the release with PhoneGap 2.9.0 in XCode 4.6.3 got failed with some File Not Found Error for libCordova.a.
Description: While using PhoneGap 2.9.0 to develop an application for IOS Platform,I came across a strange issue. The developed application is working perfectly in simulator as well as debug fine in IOS device. But when i tried to archive the application for store push, then i got the below error:
file not found: /Users/ashish/Library/Developer/Xcode/DerivedData/ gylybvwifdxjmtajtbvdsdpjcvkl/Build/Intermediates/ArchiveIntermediates/ ashish/InstallationBuildProductsLocation/Applications/libCordova.a
clang: error: linker command failed withexit code 1(use-v to see invocation)
This looks like some missing file raising the File Not Found Error. So i looked over the path and found that the file sould be auto generated by the Phonegap if that is required. Some finally get to know that this is a issue with PhoneGap.
Solution: To resolve this issue, we need to follow below steps,
Step 1 : Go to the Project’s “Build Settings”.
Step 2 : Choose the “Other Linker” menu and click it to open it.
Step 3 : Delete “$(TARGET_BUILD_DIR)/libCordova.a”.
Step 4 : Change “-force_load” to “-all_load”
Step 5 : Save it
That’s all. You can now go for the Archive and have the ipa file ready to release.