Archive - Share resigning is using old provision - iphone

So my distribution certificate expired (happy anniversary) so I had to go through the fun of new cert, provisioning profiles, etc. Everything seemed fine, made the new build and sent it to my client, and the the fun started.
he kept getting the dreaded "entitlements are not valid" message. I knew for a fact that his device was on the ad hoc mobile provision (i even opened it and found the device id in question)
After banging my head on my desk for a couple hours, trying cleans, rebuilds, redoing the cert, profiles, etc, all to no avail, i noticed the "dont resign" option on the share dialog in the organizer. I said what the heck and gave it a shot. much to my surprise, that ipa worked like it was supposed to.
so the only logical thing i can think is that the provisioning profile organizer wants to use isnt the one i actually signed it with, but the old one. that said, i have cleared the old one off the system completely (out of organizer, the file is gone, no longer referenced in the project)
so everyone is happy now, they can test this version, but i hate not knowing why (plus its going to be really annoying every time i have to select that option)
anyone have any ideas as to why and how to catch organizer up?

Related

ios - provisioning profile issues

I recently re-installed my mac for a good spring clean and did a complete backup with Super Duper:-)
Now on the day I did the re-install Apple's servers had issues with signing certificates, which I didn't know and thought I was messing things up. So I deleted all of them from my account and thought to start over again.
I have them downloaded, but obviously they are not on my account anymore.
Now I have an update for an app in the app store and no matter what I try, I can't sign the app to make it ready for the upload. Have I completely stuffed this and do I need to make a new app in iTunes Connect?
PS I do not believe this question is under NDA - if it is I am happy to delete it, I have also posted this on the apple forum, but I am seem to get quicker answers here:-)
Thanks for your help.
Whatever you do DON'T make a new App. This is simply a provisioning profile and signing certificate issue. Just go through the process of setting those up all again. And then make sure your Project knows to use the NEW ones and does not have references to old ones in Git or whatever source code control you use.

iPhone signing problem: Private keys "disconnected" from developer and distribution certs

From time to time, may iOS developers experience the problem of being unable to build their apps for deployment to a device because the Keychain seems to forget that their developer certificate is associated with their private key. Both the developer cert and the private key are present, but they don't show up "under" each other as they should.
Ditto for the distribution certificate. It can get disconnected from its private key and XCode will refuse to work.
Searching the web reveals dozens of versions of this question being asked here and elsewhere. The result is either "Hey, this morning it works!" or the thread goes dead and there's no answer. (Alternative to the former is "I rebooted and it works" or "I re-launched XCode and it works".)
The answers I previously received before were all "read Apple's exemplary and flawless documentation". Well, I've been there and I've done that. Like I said, this was all working fine and now it doesn't. Nothing changed. It does this 3-4 times per year. In the past I was one of those "I re-launched XCode and now it works" guys but this time no amount of dragging, dropping, relaunching, or re-booting will work.
I'm looking for suggestions.
I am not sure what is causing it for you, but I know one way to fix it. I just installed lion and went through the same thing. I simply went to the Apple Developer portal, deleted my developer certificate, followed their tutorial (which shows up when you create a new developer certificate). This basically had me generate a new CSR (Certificate Signing Request) in KeyChain. Uploaded the new cert, then had to go into my apps and make new dev profiles with the new certificate.

Updating application with new certificate

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'm in an iPhone provisioning mess -- Insight needed

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.

Whats the best workflow for adding a new device to an adhoc provision?

So we all need to deploy our applications to real iPhones for testing purposes. I'm sure you much like me have found a group of sucke^H^H^H^H^H testers to help you out with this process. Whenever you want to send a build out to a new person this requires adding the new device id to your ad hoc provision. This part is fairly painless. The trouble starts when trying to get Xcode to use the new provision file.
Whats the best way to get Xcode to pickup and use the new provision first time? Ideally I would like to do this without changing the .xcodeproj file.
I've done this as follows, with good success:
Send out call for beta testers.
Respond to each with "in order to beta test, I need your UDID. You can send it to my by following these instructions..."
Folks incapable of sending UDID are told "thank you for your time, but beta is no longer taking applications."
If too many people can't figure it out, review your instructions.
After several days, make a batch provision file with all the people in beta.
I name the devices after the person's email address, i.e., mikeATexampleDOTcom.
I name the provision after the beta program, i.e., Neko-beta-1.
Build the app, provision & deliver (with non-technical installation instructions!)
For stragglers, you can either build another provision, or add them to the existing one, or tell them "beta's full."
Then...
After a few days, send email asking how its going, if they have any difficulties, etc.
~3 days before end of Beta, email saying "beta is coming to a close, please be sure to return your questionaires."
After close of beta, be sure to thank everyone, even those who did not reply.
How to automatically build an IPA file from XCode: http://www.idotcom.us/2009/05/how-to-build-a-ipa-file-from-xcode/
Step-by-step explanation of how to build an IPA file to send out via ad-hoc. You do have to change your XCode project but this way you create a separate target so it doesn't affect your main project.
What I do now is create a new provisioning profile if the devices change. Even if you modify an existing one, it is essentially a new profile with a different ID, but a new name. Then testers' iPhone fill up with provisioning profiles with the same name :)
Yes, it means changing your Xcode project file each time, but in my experience it's more reliable.
If you do keep the same name, beware of Xcode's cache of provisioning profiles, which can create a mess with builds. Your best bet is to remove of all the provisioning profiles from the Organizer window, as well as deleting the files in ~/Library/MobileDevice/Provisioning Profiles. Then restart Xcode and reimport the provision profile.
I haven't been able to do this without changing the .xcodeproj file, but that's probably because I've had terrible luck getting things to work without going through the whole "build clean, deselect the provisioning profile, reselect the provisioning profile" process.