Help please! Codesign failed (again)

Somebody please help. I’ve been tearing my hair out over this problem for 3 days now. I’ve been working on a new app, and everything was going fine until Wednesday of this week. I had built the app for testing on my device a few times, and thing were working ok, until all of a sudden I got the “Application failed codesign verification. The signature was invalid” message.

I’ve deleted all my keys, certificates, provisioning profiles and my corresponding info in the Provisioning Portal, and I’ve resubmitted a certificate, made new profiles and installed them but still get the error.
My app will install onto my iPhone, but, with errors. I have a menu in my game with 6 options. Two of the options return a "Director Class - Error. Director Error. Failed to load module ‘letters’. " message. The app works fine in the simulator.

Any ideas?

Thanks [import]uid: 92074 topic_id: 17115 reply_id: 317115[/import]

I just remembered some of the good instructions on clean slating the keychain / provisional profiles. See the links below. I’m sure they will help you get through the process (if your problem is something to do with getting the valid code signing certificate).

Naomi

https://developer.anscamobile.com/forum/2011/03/16/application-failed-codesign-verification-over-and-over-again-ugh#comment-34399

https://developer.anscamobile.com/forum/2011/03/16/application-failed-codesign-verification-over-and-over-again-ugh#comment-61682

https://developer.anscamobile.com/forum/2011/03/13/build-app-store [import]uid: 67217 topic_id: 17115 reply_id: 64549[/import]

Thanks Naomi, i got it sorted. I ended up scraping all my certificates and keys, starting over, and only assigning adhoc and distribution profiles. So far the adhoc profile is working fine. No idea why the developer profile doesn’t work though. Thanks for your help [import]uid: 92074 topic_id: 17115 reply_id: 65143[/import]

Glad to hear you got it working again! It was the biggest pain I had to deal with. Everything else feels like piece of cake in comparison. (And yet, once you figure this one out, it’s almost a joke why it was so hard.)

Naomi [import]uid: 67217 topic_id: 17115 reply_id: 65145[/import]

Hi Naomi - I was wondering how things are going with the codesign failed verification issue. Have you had any repetitions since June '11?

I’ve just had the same thing happen to me and I’m researching the best solution. Your clean up and Ad Hoc idea sounds good.

Is it still working for you? [import]uid: 94653 topic_id: 17115 reply_id: 92848[/import]

Hi Jazzybossa - yes, mine is still working without any issue using AdHoc certificate (and I’m using Daily Build 706). I haven’t used Distribution certificate for a while, but I don’t anticipate any problems.

Good luck!

Naomi [import]uid: 67217 topic_id: 17115 reply_id: 92885[/import]

Edit: typo fixed.

I’m wondering what changes might’ve triggered the issue. You mentioned things were working ok, until all of a sudden I got the "Application failed codesign verification.

Did your code signing certificates expire right before your problem began?

If not, did you change the Corona build (like from stable build to one of the daily builds)? Or did you make changes to your lua code? If you haven’t changed the Corona build, and you’ve made no changes to your code right before the issue started happening, then you sure needed to fix the code signing certificate(s) and redo the provisioning profiles.

If you’ve clean slated your keychain (code signing certificates and provisioning profiles), and if you are using XCode, you may want to open the organizer, click on provisioning profile, and check to make sure you have the current provisioning profiles listed there. You can also click on “Refresh” button, which will fetch the provisioning profile from Apple Developer Center for you. EDIT: I just re-did my provisioning profiles (because I wanted to add another device for testing), and “Refresh” fetched Dev certificate, but not Ad Hoc or Distribution certificates. I needed to download Ad Hoc and Distribution certificates from Apple Dev Center and drag & drop them into Xcode provisioning profiles in organizer window.

Once you have provisioning profiles ready, when you generate your device build form Corona Simulator, make sure you use valid code signing certificate. I have 6 certificates to choose from after having messed with this process one too many times with test projects, etc. When I generate a device build, I use Ad Hoc certificate.

When I try generating device build using Developer Certificate , I get warning: Application failed codesign verification. The signature was invalid, or it was not signed with an iPhone Distribution Certificate. (-19011)

Very disturbing, and it drove me nearly insane. I still get the same error, and I now don’t even think about it – because all I need is Ad Hoc certificate to generate a device build to test the game on my device (and test the In-App Purchase through iTunes Connect sandbox). And when I’m ready to upload my game to App Store, I’d use Distribution Certificate (which also works perfectly fine).

I don’t even know what I need the Developer Certificate for. (If anyone on this forum knows what Developer Certificate is for, I’d love to hear about it. If the warning that comes up when I generate device build using Developer Certificate is a serious problem that I should correct, please let me know. I wasted over a week dealing with the warning that comes up when I use Developer Certificate (while my Distribution certificate and Ad Hoc certificate were working perfectly fine). If I need Developer Certificate to build my game to go live on App Store, I’d like to know right away – but from what I understand, all I need is the Distribution Certificate to generate my final release build.

Anyhow, once you have the new build of your app generated (using Ad Hoc certificate), before you install it on your device, you may want to delete your app that’s already installed on your device. This is just to make sure things get cleaned out before you install your newly built app.

Hopefully, Ad Hoc certificate will get your app built and run perfectly fine on your device.

Naomi
[import]uid: 67217 topic_id: 17115 reply_id: 64413[/import]

Hi Mega - may I ask if you’re failed codesign issue is resolved, and if there have been any other problems from it?

It’s recently happened to me - everything fine, then the Developer cert plays up. I got a distribution cert but that also gives same error message. So it looks like a clean out is in order. [import]uid: 94653 topic_id: 17115 reply_id: 92968[/import]