[Resolved] Xcode signature error - Have tried everything I can think of

Hi All,

I’m new to CoronaSDK and testing things out, so I don’t have a subscription yet.

I’m getting the dreaded error from Xcode when I try to load my app onto my iPhone:

The application does not have a valid signature.

I’ve read lots of postings on the problem, and have worked through as many possibilities I could find, to no avail. I can install an Xcode HelloWorld tutorial onto my phone just fine, so I don’t think the problem is in my certificates or provisioning. I get the same error with my own app or with Corona’s sample apps.

  • no subdirectory named ‘resources’
  • same problem with corona sample apps
  • CAN successfully load xcode tutorial apps
  • did check permissions of certificates and keys in keychain access (as per peach’s suggestion)
  • removed all expired certificates from keychain
  • deleted and reinstalled certificates and provisioning profiles, tried a new provisioning profile
  • don’t think i have spaces in build path

The last one I’m a bit confused about - what exactly is my build path? Is it the path to the project folder (definitely no spaces there) or is it the path to the Corona Simulator (its name has a space…). Or would the fact that my disk is called “Macintosh HD” cause the problem?

I’m using Xcode 4.3.2 and a recently downloaded Corona Simulator 2011.704
I’m using a dev certificate, because I only have a trial Corona account.

I’d really appreciate any ideas or help.

UPDATE: It’s not spaces in the build path - I am building directly to the desktop, which has resolved the issue for other users. I’ve been working on this problem for several days already, and would be grateful for any help. [import]uid: 148592 topic_id: 26966 reply_id: 326966[/import]

Update: I’ve very carefully repeated all the steps described here (although using the developer certificate): https://developer.anscamobile.com/forum/2011/03/13/build-app-store

And still no love.

When I load a built Corona sample app (in this case, Clock) onto the device through Xcode I get:
The application does not have a valid signature.

Through iTunes I get:
Clock failed to install.

Seriously, I don’t know what else to try. I’d really appreciate some help. [import]uid: 148592 topic_id: 26966 reply_id: 109945[/import]

It’s rare to see this kind of thing come up when you aren’t having issues building with Xcode. I did see something similar once recently in which there was an apostrophe in the certificate name which I believe was behind it.

Do your certificates (or provisioning profiles) have any special characters in them? [import]uid: 52491 topic_id: 26966 reply_id: 109991[/import]

Hi Peach,

Thanks for answering!

No special characters or spaces in any of my info-- I had seen that too in one of the forum posts.

[import]uid: 148592 topic_id: 26966 reply_id: 110126[/import]

I realized after thinking about your message that there was an apostrophe in the device name itself (i.e. Sal’s iPhone) but I renamed the phone in both iTunes and the apple developer portal, deleted all the old provisioning profiles, created completely new ones, built a new sample app from Corona, and sadly got the same error message. [import]uid: 148592 topic_id: 26966 reply_id: 110152[/import]

Hey, yeah, I wouldn’t think that in device name would matter - I just recall a situation in the past where I *think* it caused a problem with a certificate.

When you say you got the same error message, do you mean that Corona warned you the app didn’t have a valid signature and then you also got the Xcode error “could not install”, or were there any changes at all to either error?

What about when you try to build for the Xcode simulator? Can you do that?

I’m not sure what’s up with this but any info you give me will hopefully help me find some - I hate knowing people are having signing issues, they are incredibly frustrating, I know :frowning: [import]uid: 52491 topic_id: 26966 reply_id: 110228[/import]

Hi Peach,

It’s been exactly the same error no matter what I’ve tried or changed over the past week. Corona builds just fine, no problems at all (with my apps, or the Corona sample apps like Clock, HelloWorld or TimeAnimation). Then I drag the new app file onto my device in the Xcode organizer, and see a loading bar with a whole lot of activities flashing by, then it gets to the very end of that and Xcode gives this error message:

The application does not have a valid signature.

It also fails when I try to load the app through iTunes.

I did once check the app through terminal (and just tried it again) using this command recommended by apple:

codesign --verify -vvvv -R=‘anchor apple generic and certificate 1[field.1.2.840.113635.100.6.2.1] exists and (certificate leaf[field.1.2.840.113635.100.6.1.2] exists or certificate leaf[field.1.2.840.113635.100.6.1.4] exists)’ TimeAnimation.app

And got the result:

TimeAnimation.app: invalid signature (code or signature have been modified)
In architecture: armv6

So it appears that somehow the app is genuinely not getting signed properly.

I can still build an run a native Xcode app on the phone just fine.

I’m not sure how to go about building from Corona for the Xcode simulator - newbie here - do I have to do a full setup to get Xcode running as the Corona editor? I started in on that but got bogged down.
[import]uid: 148592 topic_id: 26966 reply_id: 110285[/import]

Try the tips mentioned here: http://developer.anscamobile.com/forum/2012/03/24/help-adding-xcode-432 [import]uid: 84637 topic_id: 26966 reply_id: 110314[/import]

Resolved! Thank you!

That was it. It turned out I had a very old copy of Xcode lurking in a Development folder (Xcod 3.1). I had seen the thread a while back, but when I checked for an older Xcode in my applications folder, there wasn’t one, so I moved on (too quickly, it now seems).

Searching my hard drive more carefully, I uncovered the old Xcode and then followed the instructions here:

http://developer.anscamobile.com/reference/xcode43

In particular these:

To see the current set path, type the following in the Terminal:
xcode-select -print-path

(and indeed, mine was set to the old copy of Xcode)

For Xcode 4.3, the default Xcode path is:
sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer

This reset my Xcode switch path to the correct one for Corona.

I rebuilt in Corona, dragged it over to the phone in Xcode, and the application installed correctly.

Hope this helps someone else who finds themselves in my situation. & Thanks again for the suggestion.

[import]uid: 148592 topic_id: 26966 reply_id: 110485[/import]

Awesome, glad to hear you got it working :slight_smile: [import]uid: 84637 topic_id: 26966 reply_id: 110486[/import]

Thanks again for the help. [import]uid: 148592 topic_id: 26966 reply_id: 110559[/import]

Hello, i was trying to deploy a example on the device but Xcode says that the app doesn’t have a valid sign… but i run in the terminal codesign --verify -vvvv -R=‘anchor apple generic and certificate 1[field.1.2.840.113635.100.6.2.1] exists and (certificate leaf[field.1.2.840.113635.100.6.1.2] exists or certificate leaf[field.1.2.840.113635.100.6.1.4] exists)’ example.app and it seems everything is fine… no errors…
any help would be grateful…
Xcode 4.3.3
osx lion
thanks in advance [import]uid: 122927 topic_id: 26966 reply_id: 119634[/import]

Can you install any of our sample apps on device? [import]uid: 52491 topic_id: 26966 reply_id: 119805[/import]

Hello, i was trying to deploy a example on the device but Xcode says that the app doesn’t have a valid sign… but i run in the terminal codesign --verify -vvvv -R=‘anchor apple generic and certificate 1[field.1.2.840.113635.100.6.2.1] exists and (certificate leaf[field.1.2.840.113635.100.6.1.2] exists or certificate leaf[field.1.2.840.113635.100.6.1.4] exists)’ example.app and it seems everything is fine… no errors…
any help would be grateful…
Xcode 4.3.3
osx lion
thanks in advance [import]uid: 122927 topic_id: 26966 reply_id: 119634[/import]

Can you install any of our sample apps on device? [import]uid: 52491 topic_id: 26966 reply_id: 119805[/import]