ios - provisioning profile issues - iphone

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.

Related

How to solve Invalid Binary error in App Store

A few months back I uploaded my iPhone app on the app store. Now I wish to add a new version. I didn't have the last profile or certificate. So I created a new one. Followed all the necessary steps, yet it says Invalid Binary. I am working on a deadline, and it's really important to solve this issue. Please help. I have followed many forums, questions, and answers but no luck.
If I've understand right you lost the original developer certificate (the one that Apple say "keep this safe or you're lost") and create a new one from scratch.
Doing this you create a complete new "identity" (I mean, not a copy of the original one) so you can't upload the app as an upgrade of the older.
But if you still have somewhere the .p12 file you can re-install the private/public keys and download the old certificate of the app and this should works.

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.

IPhone Development Profile Expired

I really combed this site and others. I read and re-read the related links here and the Apple docs. I'm sorry, but either I am obviously missing something right under my nose, or this Apple profile/certificate stuff is a bit convoluted. Here it is:
I have a product in the App Store.
I have updated it several times and users like it.
My development profile recently expired just when I was improving the app for its next release.
I can run the app in the simulator.
I can compile and put the distribution build on my iPhone just fine.
I went to the Apple portal and renewed the development profile.
I downloaded it and installed it in Xcode.
I see it in the Organize window.
I see it on my iPhone.
I CANNOT put the debug build on my iPhone to debug or run with Instruments. The message is that either there is not a valid signed profile or it is untrusted.
I subsequently tried to download and install the certificate to my Mac's keychain.
Still no success.
I checked the code signing section of Project settings and also for the target and the root. All appears to indicate that it is using the expected development profile for debug.
Yes, I had deleted the old profile from my iPhone, from the Organizer. I cleaned the Xcode cache and all targets. I have done all of this several times and in varying sequences to try to cover every possibility.
I am ready to do anything to be able to debug with Instruments in order to check for leaks or high memory usage. Even though the distribution compile runs fine on my iPhone and plays well with other running processes, I will not release anything without a leaks/memory test.
Any ideas will be appreciated. If I missed something obvious, please forgive me - it was not due to just posting a question without searching for similar postings.
Thanks!
All problems solved! I am very happy this all happened because I learned so much about Xcode, keychains, certs and provisioning. Unfortunately, there is not a simple answer. Here are the highlights:
I needed to recreate the ad-hoc profile and install it on my device. (That was MY BIG oversight and the reason the dist build no longer ran on my device.)
Between the very first time I created my profiles and the date my development profile expired, I upgraded to the 3.1.3 Xcode SDK.
It seems that this now means you need 2 entitlements files; a debug version with the get-task-allow checked and a distribution version with get-task-allow unchecked. Each need to be set in the respective settings.
In Project settings, I needed to set both my working directory and intermediate directory to the build product directory.
BIGGIE - I had to double click on the target and reset the appropriate code signing profile. There was an old profile name still there for some reason! Now, I can debug, and drop my distribution on my device without a hitch.
So, in summary, I believe that my original problem (not being able to debug after renewing my dev profile) and the problem that resulted from all my efforts to fix the first were caused by:
the fact that I upgraded to 3.1.3 during my dev cycle
my own oversight (I apologize to Apple for my criticism)
an Xcode quirk (the old profile name hanging around in target settings).
I hope this helps others. The best advise I can give is to take a day off and then create a new empty project, going through the same process step by step.
Thank you all!!
Try re-creating your development mobileprovision file on Apple's site. Be sure to delete all old copies from Organizer (including those on the iPhone itself).

Transferring iPhone Provisioning Profiles

I thought there had already been a similar question but searching for it yielded no results. So if anyone can find it and link me I would appreciate it.
I have not done any iPhone development in months (Since last August I believe) and since then, I have reformatted my MacBook when I installed Snow Leopard. Well, I am interested in working on an iPhone application now. My question is, how do I go about continuing iPhone development? More specifically, I did not back-up my provisioning files and/or certificates. Do I just go back to the developer center and re-do the steps required to get the provisioning files?
Thanks!
EDIT: Apparently it wasn't clear when I mentioned that I did not back-up my provisioning files. By this I mean I did not back-up the contents of my keychain or the certificates I downloaded from the developer center.
I'm not sure quite what you mean when you say you didn't back-up your provisioning files and/or certificates. Did you back up your Keychain and other user data? If so, you can restore that, then re-download the provisioning profile from the portal.
If you also lost the contents of your Keychain when you reformatted, and don't have any way of restoring them, you may have to talk to Developer Support. At a minimum you'll have to go through the certificate request process again.
Once you get the situation sorted out, follow the steps here to back up all your development info!
You will need to regenerate a certificate through the developer portal, and then generate new profiles.
You can probably just download the certificates you already created unless they are expired in which you just need to renew them. You can also simply restore them from a backup which I'm sure you have :)