Signature invalid only for ad hoc - iphone

I'm not sure what changed on my ad hocs but I get this error when trying to install:
Application failed codesign verification. The signature was invalid, or it was not signed with an Apple submission certificate. (-19011)
Device debug builds fine. The cert that is associated with my ad hoc provisioning profile doesn't expire until 2011. I've searched Google but haven't found any applicable solution, except some mention about deleting and recreating the certs. Before I go down that rode, has any one experienced and resolved this issue?
I'm using Xcode 3.2.3 and building against sdk 3.0.

Sometimes I get this issue as well. Do you have any expired profiles on your phone? I find that sometimes expired profiles (even if it is for a different application) will cause debug builds to not install.
If all else fails, delete all the certificates associated with your developer account from Apple in Keychain Access. Get yourself a new certificate, and modify the provisioning profiles to reflect the new certificate. This is a huge pain, but if all else fails, this works.
Hope this helps!

Related

Distribution Certificate in xCode Organizer

Can I have more than one Distribution Certificate? I am developing an app but the current certificate was not created by me and is for another app. That app and cert was done by someone else who is no longer here.
I downloaded the vert, but in the organizer it tells me, Valid signing identity not found.
What am I to do?
Thanks for the help.
The error is shown, because a valid Signing Identity is not found. The Apple Documentation clearly describes how to export/import it. You should ask the certificate's creator to export his own copy of the certificate (because it can't be re-downloaded from the iOS Dev Center), then you can import and use it.
There's a difference between certificates and provisioning profiles.
Certificates are associated per account while provisioning profiles are for individual apps under each account.
If you are working with multiple iTunes / Apple Developer accounts, then yes you should have a certificate for each of those accounts installed in your keychain.
And assuming your app has it's own application (bundle) ID, you need to have a provisioning profile for each of the apps you're developing under that account. There are different provisioning profiles for distributing ADHOC builds and the Store build that gets uploaded for review by Apple.
It sounds like you need to start with just getting the certificate for the account you want to work with, then the provisioning profile.

Provisioning Profile Issue

My Apple Certificate had expired. So i went in the Developer's Provisioning Area and Revoked My certificate. I deleted my old certificate, and old provisioning profiles.
Upon notification from my Team Lead. I downloaded the new Developer Certificate to my Mac and Dragged it into KeyChain Access. Now it shows my certificate as valid. I re-downloaded the provisioning profile for my App. and Dragged it into XCode4. The Organizer shows it to be valid but with a warning
XCode Could not find a valid private key/certificate pair for this profile in the keychain.
Have i done something wrong in my approach.
I am able to run my app on the iPAD and debug it too. But i somehow sense an issue in the above statement.
Please Help.
If you didn't recreate the provisioning profile with the new developer certificate (i.e. if you downloaded the old profile) then I think this is the problem - you will need to create a new profile with your new certificate.
You did to get the certificate key/pair from your team leader. Apple does this weird thing where it actually signs it's certificate with a "password" in order to use the certificate you have to have the "password". That's why you get XCode Could not find a valid private key/certificate pair for this profile in the keychain. I had the same thing, you can't just download the new certificate :(. If I can find the documentation of Apple that says how to do this I will post it in an edit.
Ok here is the docs: https://developer.apple.com/library/ios/#documentation/Xcode/Conceptual/ios_development_workflow/10-Configuring_Development_and_Distribution_Assets/identities_and_devices.html#//apple_ref/doc/uid/TP40007959-CH4-SW2
It is under "Provisioning a Device for Development", I Hope this helps!

Build app.. and then i get this?

Well, i opened my project today, went to build my app again after making 1 or 2 small changes, and i get this:
Application failed codesign
verification. The signature was
invalid, or it was not signed with an
Apple submission certificate. (-19011)
Any ideas how to fix this?
check your project (and target) settings, which developer profile is used. You probably have install a new developer profile and this project still use an old one.
check certificate in keychain access and provisioning profile code_sign_identity need consistent.

Apple's Developer Certificate and Provisioning Profile

Can I use someone else's Apple's Developer Certificate and Provisioning Profile to build and run my application on the iPad ? Are the certificates and profiles Machine Specific ?
Actually I am trying to install my friend's dev certificate and it is getting installed but when I am installing the provisioning profile its showing me an yellow warning "
The main question is that The Developer' Certificate and Provisioning profile can be used on different machines or not ?
See the message, "A valid signing identity matching this profile could not be found". You are adding the certificate in your keychain, not the identity(which is a .p12 file containing the private key). From wherever you got the certificate, you should get the private key exported from the keychain rather than exporting only the certificate.
At the end, like BoltClock said, it is violation of Apple's license to use some others' certificate.
"Error: "A valid signing identity
matching this profile could not be
found in your keychain"
Solution: Most likely that you have
not downloaded the necessary WWDR
certificate from the Apple developer
site. There is a link to download this
certificate in the 'Certificates'
section of the developer portal. If
you do have the certificate in your
keychain, make sure that it has not
expired (unlikely, as mine is valid
until 2016). Also make sure that your
developer certificate has not expired
(these seem to be valid for only 12
months at a time)."
http://discussions.apple.com/thread.jspa?threadID=2220082&tstart=0
If you want to run your app on a device then you have to add that device's id to the certificate.

A valid signing identity matching this profile could not be found in your keychain

I am able to test my app on my device using the development profile/certficates...
In the same way, I have created distribution profile/certicates for my app....
But when I try to upload my app to iTunes , it says "Application failed codesign verification"
Also in the Organizer, it says "A valid signing identity matching this profile could not be found in your keychain"
i have tried everything that is listed here by other users...But not sure what the issue is...Please help me.
You need to have the little key under your certificate in keychain Access. If you do not you need to revoke your certificates in your developer account and start over.
More info here,
http://developer.apple.com/library/ios/#qa/qa2008/qa1618.html