libCordova.a File is Missing Causing Errors In Xcode before Archiving for Release

The libCordova.a file is red as you can see in the screenshot below. Why is that so? And how do I fix it? This file is clearly missing, this is the only problem holding me back from releasing my application.

EDIT

Ok, so I figured how to get Xcode to stop making it red (using this tutorial: http://outof.me/embedding-cordovalib-in-your-iosphonegap-app-project/) , but then again it will not let me archive. I’ve run “archive” over 20 times with no luck and with this same error:

ld: file not found: /Users/MY NAME GOES HERE/Library/Developer/Xcode/DerivedData/Alter-arpezfgnfzcguefnjpllgwzddkld/Build/Intermediates/ArchiveIntermediates/Alter-App Store/BuildProductsPath/App Store-iphoneos/libCordova.a
clang: error: linker command failed with exit code 1 (use -v to see invocation)

The error is: Apple Match-O Linker Error

A more up-close look at the error:

EDIT

After cleaning the project, the libCordova.a file is still missing and the error above still applies.

Edit: Xcode is acting really weird. libCordova.a is not red anymore (surprisingly yet I still get the error above).

I am having the exact same issue with my Ionic app. Xcode 5.1.1 & Cordova 3.5. This is likely a Cordova issue, but it’s an issue regardless. Anyone figure this one out?

Ok, so in my case I was creating a new “Distribution” build configuration, and when I would attempt to create an archive from the “Distribution” build configuration I would get the same error. There is a thread on Stack Overflow where someone said they were able to just create the archive with the “Release” build configuration instead. That worked!

I think the issue may be here: