Phonegap/Cordova Build error - Apple Mach-O Linker Error: no such file or directory: libCordova.a Phonegap/Cordova Build error - Apple Mach-O Linker Error: no such file or directory: libCordova.a xcode xcode

Phonegap/Cordova Build error - Apple Mach-O Linker Error: no such file or directory: libCordova.a


What I found confusing with PhoneGap/Cordova 2.1.0 by upgrading from 1.4 is that there are TWO projects in my application. There is MyApplication.xcodeproj and CordovaLib.xcodeproj. The changes to resolve this issue need to be applied to the CordovaLib project.

  • Change "Build Active Architecture Only" to "YES"
  • Update the text file project.pbxproj to these values
  • Toggle between the build schema for the simulator and the device (Use the select menu next to the stop button. Somehow this seems to cause the changes to be detected).

Did this work for you? Did I miss something?

PS: For a better understanding of the problem take a look at this Google Forum thread


I'm using Cordova/Phonegap 2.9 and this solved my issue. Didn't touch any of the arch stuff. Everything is set to armv7 armv7s on mine.

Follow these steps to fix this problem:

  1. Go to project settings and Build Tab.
  2. Search for "Other Linker Flags"
  3. Double click on the linker flags for Release and Change ${TARGET_BUILD_DIR}/libCordova.a to ${BUILT_PRODUCTS_DIR}/libCordova.a
  4. Do the same for Debug Clean and build archive again


I had the same error and fixed it by reverting to an older version of cordova ios.

Steps to fix the issue:

  1. Uninstall cordova-ios first, with npm uninstall cordova-ios
  2. Install old version of cordova-ios with npm install cordova-ios@4.4.0
  3. Remove existing ios platform with ionic cordova platform rm ios or ionic platform rm ios
  4. After that we should add platform with ionic cordova platform add ios@4.4.0 or ionic platform add ios@4.4.0
  5. Run ionic cordova build ios.

Instructions came from here.