3

I've been having trouble code signing my Cordova-based app for either App Store or Ad Hoc deployments.

I can get it to build and run on both my emulator and my iPad. I can also create an archive using XCode without any problems. But when I try to create an Ad Hoc .ipa file or push to iTunes Connect, I get this message in an alert dialog:

Code signing operation failed
Check that the identity you selected is valid.

It seems I have tried everything.

  • Recreated my development and production certificates along with development, ad hoc and app store provisioning profiles in Apple's developer portal
  • Deleted all the certificates from my keychain and reinstalled them
  • Deleted all the provisioning profiles from my system and reinstalled them
  • Set the code signing identity on my project to all combinations of the following
    • iOS Developer
    • iOS Distribution
  • Set my provisioning profile to all combinations of the following
    • Developer profile
    • Ad hoc profile
    • App store profile

None of these have gotten me past the code signing error in Organizer. So then I tried using xcodebuild from the command-line and got the following error:

error: Code signing operation failed

I have another app on my workstation that was created with Titanium. Using Titanium I can build and deploy both Ad Hoc and App Store versions without any issues.

Is there something with the CordovaLib project inside my app's XCode project? Or is there something I'm configuring wrong within my project.

I've spent about 8 hours working on this issue so far. Any insights would be greatly appreciated.

Versions (for reference)

  • My workstation is a Macbook Pro with OSX 10.9
  • XCode 5.1.1
  • Cordova 3.4.1-0.1.0
rmaddy
  • 314,917
  • 42
  • 532
  • 579
noahlively
  • 51
  • 1
  • 4
  • I was able to solve the problem by removing some files from within the www/ directory in my phonegap app. There were non-essential files to my app, primarily related to automated testing and nodejs modules. I haven't figured out *why* they were breaking code signing, but it worked when I removed them. So strange... – noahlively May 28 '14 at 22:11

3 Answers3

1

Check the System Console: Applications > Utilities > Console

It seems this is where XCode prints out most of the errors that are useful in solving this problem.

I also ran into a similar issue where I had non-essential files in my www/ directory and removing these fixed the problem. But it wasn't until I checked the System Console that I realized where to look for these files.

shedd
  • 4,198
  • 4
  • 33
  • 42
  • Where in Console? I checked and didn't see anything. See: http://stackoverflow.com/q/25109616/1449799 – Michael Aug 11 '14 at 19:05
1

I also had this problem and spent hours and hours trying to figure out the code signing issue by revoking and recreating certificates, and deleting and recreating provisioning profiles.

After all of that, and finding this thread, I tried deleting some parts of the project, as the original poster said. The culprit ended up being grunt.js

rm -R www/node_modules/grunt* fixed everything for me.

trey-jones
  • 3,329
  • 1
  • 27
  • 35
0

Thanks so much to @threeve and @shedd, I fixed my very similar issue How to build IPA for distribution with TestFlight with XCode 5?! I list there specifically the files I deleted (reproduced here for convenience):

... Gruntfile.js, karma-e2e.conf.js, karma.conf.js, and the entire node_modules directory.

Community
  • 1
  • 1
Michael
  • 2,973
  • 1
  • 27
  • 67