My app has been more or less ready to be submitted for a while now, but as usual, the overly complex provisioning nonsense that Apple forces developers to jump through is causing me an enormous amount of stress. Initially the problem I was receiving was Invalid Codesign. After trying every 'solution' i could find on the internet and failing, I decided that it would be best if I started fresh -- Deleted all my provioning profiles, cleaned up my itunes connect account, deleted all my keys and certificate from the keychain access and started from scratch. The problem is that once I deleted by keys and developer certificate from the keychain access, I cant get them back!!! I've tried restarting, I've tried installing it every way imaginable, but I just cant get anything to be listed in the 'keys' nor 'my certificates' sections of the keychain access. I do have an iPhone edveloper profile in the 'certificates section' but this doesnt even seem to be of any use because when I look in the Organizer there are no developer profiles listed, and all my provisioning profiles warn "A valid signing identity matching this profile could not be found in your keychain"
Someone please help me through this mess. I've been developing my app for several months now and I already have an app in the App Store but Apple insists on making this process damn near impossible. Thanks so much!!!
Your public and private keys are automagically generated when required - if you use the certificate assistant to request a signing certificate as the provisioning profile describes you will find your new private/public keys created.
Once you begin this process you should also use spotlight to remove all .mobileprovision and .cer files you may have remaining in downloads, and also use organizer to remove profiles from devices. If you are starting from scratch you want to make sure none of that stuff remains to cause you problems.
This is an overcomplicated process to be sure, but once everything is really deleted and a fresh start is made it should be good for some time. The biggest problems I have had are when getting a new Mac and having hiccups with exporting/importing keys in an effort to keep my old certificates/provisioning valid.
Related
Right now I'm just trying to test my app on my phone and not deploy to the store.
How are all these things related? Since I'm not trying to upload to the store, can I ignore any of them?
I'm on the University Developer program. I was able to get a certificate and install it in Xcode, but builds still fail.
Is solving this problem just a matter of changing the application identifier? How do I know what to put in?
One thing I noticed is that in the Developer Portal I see only one App ID but it's for someone with a different name. So I guess I don't have an App ID. Do I need one if I'm just trying to test on my phone? If I need one, then how do I get it?
Help! It seems the more I research these things the more confused I get. If you can't solve my problem, can you at least tell me how these things are related to each other?
Provision Profiles are a very long, unique, string that allows the device to recognize certificates (very VERY helpful for development).
You must provision your device with the specific bundle ID of your app (done through developer.apple.com), then install said profile in order to even think about building with a valid certificate. However, it is much easier to have Xcode generate a wildcard provisioning profile, which allows you to test ANY bundle ID (it shows up as *.mobileprovision).
Certificates are the other side of the coin. A certificate for anything (website, application) indicates that this service can be trusted by the user, and more importantly, the OS. Certificates are issued by Apple California, are valid for a year, and may be revoked at any time for any reason. On a closed and secure platform like the iPhone, a certificate is a must for any application.
I have big problems.
I'm new on a small company and now I'm in charge of the iPhone developing.
Because I'm new and everything isn't clear on my work area (I had 7 Provisioning Profiles, for example), and I wanted to restart, so I opened the Keychain Access and deleted all Certificates, all My Certificates and all Keys.
Now I know it was a mistake I deleted my Keys, right?.
I went to Apple Developer Site and download all the Provisioning Profiles and Certificates, but I canĀ“t make it work.
When I try to debug on my Real Device, it shows me "Code Sign error: The identity 'XXXXX' doesn't match any valid certificate/private key pair in the default keychain" error.
After reading over the internet I think my problem was deleting the keys, right?.
I lost the key for the certificate, right?
What can I do?
The system's previus version is on the Apple Market, so I can't delete the certificate and create a new one, no?
I really need help. I'm new and this proccess is really difficult for me.
Thanks and sorry for my poor english.
You can savely revoke the certificates in the provisioning portal and recreate them with a new private key. This won't affect already released apps. After that just sign your apps with the new created certificates that match your new private key.
Just follow the steps on the "How To" tab in the provisioning portal if you get stuck.
I don't know whether I can help you, as I am also new, but still making a try ..
First, you yourself understand that you should not delete ALL profiles from keychain. But, you may, certainly, delete the profiles that get expired (it shows a small red cross on the profile name if it gets expired). Now, though you have deleted all from keychain, you CAN get them back. You must have a *.cer file as you downloaded all profiles from developer site. You also have a *.p12 file. On click on both to use the certificates. In one case, you will need to provide password (I don't remember which case, sorry). Put the password and you will find them in keychain.
Now, connect your device to Mac, collect also the information to the device using Organizer. To open organizer, go to Xcode->Window->Organizer. Here, click on Devices. On the left pane, You'll see 'Provisional profiles'. Click on it. Now you can see which provisional profiles are installed. Click on any one of them. Note the app identifier. It may be in this format 'ABCDEF.com.YourCompany.*' . Copy this part 'com.YourCompany.' and paste it in your code->info->Bundle Identifier (before $PRODUCT_NAME).
In build settings, now you'll be able to find the developer profile.
To make a long story short: I have developed an application for a company and I was about to update when I discovered that in the member center area on the Apple website the Development Certificate was gone, as well as the devices and other stuff, so I made a new one and uploaded the device ID again.
So everything okay...I thought. I opened iTunes and downloaded the new provisioning profile and dragged it over to the organizer window. But it did not work. I got several different warning and errors saying the the keys, certificates etc did not match, so I Googled. I saw some posts that said: try making a new distrubution certificate...so I did, then xcode told me that I had to many certificates for that app so I exported the certificates by right clicking the selected certificates in the keychain and tapped export. I ended up with a Certificates.cer file. Then I deleted those certificates to make room for the new ones i downloaded from the member center portal.
SO now I do not know what I have done...I am afraid that I screwed something really up.
My question is: I really hope it is still possible to update the application already in appstore even though I have to recreate the certficates, provisioning profiles etc.
Best regards
You can alway start from scratch, deleting all the provisioning profiles through your developer member page, recreating the profiles you need, importing them in Xcode and rebuilding the app with them. You cannot screw things that much, not being able to publish the app once again.
Clear all the contents of Xcode, and of your provisioning profiles page, and start over. Things will work. I've done this tens of times.
I got another new account for the AppStore, I setup the new account certificates on my MAC. Now when I try to publish XCode gives me the error
CodeSign error: Certificate identity 'iPhone Distribution: 'Name' appears more than once in the keychain. The codesign tool requires there only be one.
How can I change my certificate identity for the other account? While I have to leave my Name as it is on both itunes profiles.
How can avoid this problem without have to remove one certificate each time I need to publish app on appstore.
Thank you.
Look in the keychain app on your Mac. You may have expired entries as well as current entries. Delete the expired entries and you will be okay. Worked for me today.
I create a keychain for each team, and put all the related files (public key, private key, certificate) for the team in the keychain. The only downside is that you have to set your default keychain to the team keychain when building for a device.
I have just had this problem, and my current temporary solution was to export then delete one of the distribution identities, leaving me with one identity which then XCode is happy with. So I will have to export, delete, and import each time I want to switch to a different project to make a distribution, which isn't ideal.
I am still looking for a nicer solution.
The keychain approach sounds ok in principle, but in practice it appears to be require using the "Reset the default keychain" option in Keychain Preferences, which I have not tried yet but doesn't sound like a low-risk activity.
I did publish multiple apps on multiple app store accounts using multiple certificate (for the same identity, aka "me") and Xcode manages to understand which certificate to use for which app so far (i may have to help him out by selecting the correct provisionning profile manually from time to time in the "project info" menu).
What i'm doing is to create a new certificate for every new "app store" account i'm working on, and of course never collide the app ids. That means my keychain is full of "iPhone developer - Ben (XDFUHSD)", "iPhone developer - Ben (DSUKJNSD)", etc... certificates, each beeing used for a different client.
Xcode does give me the error you mention from time to time, but it really only happens when one of my certificate has expired and i've just redownloaded a new one.
Hope this helps
For what it's worth, I got this error even though there was only one copy of the offending certificate in my keychain. The only odd thing about my setup was I'd added the keychain file from my 10.6 partition into Keychain Access, so I had two "login" keychains. Even though the other one didn't any certificates in it at all, the "appears more than once" error went away when I removed it from Keychain Access.
On the plus side, Automatic Provisioning seems to work pretty well these days, so clearing and reloading all my profiles wasn't the nightmare I'd thought it would be..
Finally got MGTwitterEngine stuff to
compile (by setting the Header Search Paths to /usr/include/libxml2 iphoneos3.0/usr/lib/libxml2)
AND link (by removing the Twitter LibXML Parsers code and assigning a weak role to libxml2.2.dylib in Targets: Link Binary With Libraries).
But when I do a Build and Go to the iPhone (not the simulator), I get this error:
"This provisioning profile does not have a valid signature (or it has a valid, but untrusted signature)."
I have followed the official Apple Developer process of getting a certificate and provisioning, etc. Obviously, I did something wrong somewhere. Has anyone come across this problem or have any ideas on how to solve it?
Things to check:
In Keychain Access, make sure you have a code sign identity (public and private keys and a certificate titled "iPhone Developer: Your Name"
In your Info.plist, make sure your Bundle Identifier matches your App ID that you created in the dev portal
Make sure you installed the .mobileprovision (from Terminal> open x.mobileprovision)
In the dev portal, make sure your provisioning profile has your certificate, your App ID, and your device all enabled. If it doesn't, fix that and re-download and re-install your provisioning profile.
Follow the instructions very carefully when creating your Certificate. One time, in Keychain Access, when I went to Request a Certificate, I had something else selected in the list panel and so it created the wrong kind of certificate. Make sure nothing in the list is selected when you do this part.
Restarting Xcode may also work... (Work for me couple of times)
Troy It looks like the issue is you don't have a keypair that is tied to the provisioning profile installed. It's tough to tell for sure but that is my best guess.
If that is the case, I've been working in a similar situation - what you need is to either generate a private key using the iphone development portal under the same account your boss used and then add that new key to the provisioning profile you are building with.
OR
You can get your boss to export the key he generated when he created the provisioning profile - he can export it from keychain and give it a password that will allow you to install it but protect it from anyone else installing it.
I guess the fifth time's the charm. I basically deleted the certificate and the provisioning file, etc., and started completely over. Viola! Now for those pesky memory leaks! :-) Oh, Java, wherefore art thou, Java? (and your majic garbage collection!)
One of the things that I tried and worked for me was to reset the keychain access
http://support.apple.com/kb/TS1544