iOS provisioning still won't work - keys and cer. not connected? - ios

After reading countless guides, tutorials and intros, I still can't get my app onto my device. I have 2 keys (actually more like 20 because of my many attempts), and 4 certificates, but the certificates and keys are not hooked up like they should be. I guess I didn't hook it up right in the provisioning tutorial launcher on the Apple dev site. How can I do it manually? I have done every possible combination, using every tool at my disposal, and it just isn't working. Every time I try to install the cer., which is supposed to allow me to connect it to a key, it just opens up the login key. This is contrary to every tutorial I have seen yet, which says double-clicking the file will let you install it. I'm sure I just keep making some little mistake along the way, but if you can help me out I would be so thankful!

GOTO your xcode organizer and try refresh.(See bottom right button in provisioning profile section)

Related

Can't validate iOS app (getting already has valid certificate)

When switching to Yosemite I did a clean install of my Mac and now I'm having issues submitting my iOS to the store.
When I validate my archive I keep getting "Your account already has a valid iOS Distribution certificate".
I have tried renaming and redownloading my certificate from the member center but that didn't work.
A very common "doh!" is you copied over the relevant item in Keychain,
BUT!
you forgot the private key part:
So fi the disclosure triangle on the left is missing and the "key" symbol part is missing, that's what's happened.
Solution: just EXPAND the triangle and highlight BOTH parts, then click export. move the file to your other Mac and open.
ALSO -- don't forget, in Xcode you have to literally login these days.
Xcode - Preferences - second tab == Accounts
It's easy to forget, say, one of your various client's accounts there.
The App Distribution Guide on the Apple Dev site states that this can be a frequent problem if moving from one mac to another (or re-installing in this case). A simple fix would be to export your certificates as a developer profile file from your previous install, but you probably don't have a back up readily available. Try clicking the 'revoke and request' button and see if you can re-download your developer profile file.
Hope this helps,
Will

How to submit to iTunes Connect in XCode 6

This must be the worst question ever asked.
I'm almost ashamed to ask it but I can't wrap my head around this.
We are trying to push my app to itunes connect for beta testing.
Now there is no way to do this because XCode 6 gives all signing errors available.
We are able to run the app on the development device just as usual. We have the profiles.
But when we set the release sign identity to iOS Distribution, the hell breaks loose.
No matching identity was the first error. Fix issue releases another error:
No provisioning profiles with a valid signing identity were found.
It's useful to note that XCode knows this better than I do so it changes the code signing identity back to developer.
That's not me, I want to distribute.
Ok so at this time we're stuck at this error. We don't know where it came from, but we do know there was another error.
While pressing the submit button in the organizer the error was:
"You already have a valid provisioning profile"
According to the apple documentation I should press the revoke & request button but that isn't there.
So here we are, totally stuck and have no idea where to go now. The apple docs are incomplete, the signing gives errors but no logs. Errors messages change, but are consistent.
What the hell should we do now?
Reinstall OSX and remove all existing profiles? What will happen with current clients running apps on those profiles?
Have a look in yoru account and check that the provisioning profiles are active and not invalid. You might need to regenerate it.
You might also want to download them manually and install them yourself.
Sometimes I've had to archive the app then submit 'manually' using application loader.
I would recommend going back to basics:
check your development and distribution profiles on the developer site. if you have recently renewed your annual subscription, you might need to recreate them.
when you are archiving make sure you chose the real testing device, not a simulator.
if both doesn't work, create a new empty project and sign it with the profiles and archive. if that works, then check if you altered the bundle settings. if it doesn't work, delete your profiles and recreate them.
I hope that helps.
Hmm. I understand the plight of having to deal with the overly complex process of app submission which should have been rather simple.
Two things:
Make sure you delete all the provisioning profiles. Revoke and request a new one. Create a new certificate with distribution licence (you can make upto 3).
Once you've done that go to tour XCode > Preferences > Accounts and open up the apple id you find there. Refresh and that should download and fix redundancies.
For more I think you should also give this a read.
How do you beta test an iphone app?
About you second issue. What would happen to apps packed with previous profiles?
Well, your app is not bundled with a particular profile and so you can create a new one and use that without pain

Xcode Code Sign error because of no Keys in Keychain

You might think, not again such a question where are already thousands of topics about. However, I've not been capable of finding the answer I needed to fix this problem.
None of these topics go as deep as the Keychain.
When I'm trying to deploy my app to an iPhone, I'm receiving the following message:
Code Sign error: The identity 'iPhone Developer: [Name] ([ID])' doesn't match any valid, non-expired certificate/private key pair in your keychains.
Now, as said, I have been looking for multiple guides or fixes, however, none of them seemed to fix this issue.
Things I've tried:
Use Apple's walkthrough for app deployment for countless of times
Searched the internet for guides for app deployment
Changed the content of the 'pbxproj' file inside the 'xcodeproj' package.
Retrieve all available profiles from Apple's server using the Refresh button in Xcode 4.6 (allows you to obtain automatically)
After trying all of these ways, I've still not been able to solve the issue. One problem I've seen is that at first hand, the certificate in the Keychain was showing an invalid status, which is now solved.
However, if I'm right, there are supposed to be two keys attached to the certificate. A public and private key, and these are not showing.
Neither are there any keys showing in the Keys tab in the Keychain Access.
Solution
(Thanks to nsgulliver)
Do everything what the post (marked as Solution) of nsgulliver says.
If you already have an active Certificate, click the Revoke button, this won't cause any trouble, you'll simply have to re-create the keys of which then will be generated a new certificate.
Make sure you have the WWDR of Apple installed to mark the certificate authority as valid.
Follow the default Provisioning Assistant guidelines.
Provisioning profiles installed on the devices or signed with for the target might not be valid, try to go to Organizer->Provisioning profile and see if the profiles have the valid status? if not try to delete & refresh them, if they appear valid after refreshing then it might solve your problem if not then you should remove all the entries from keychain and delete profiles on your provisioning portal and try to create from scratch, if you still face the problem then take help from step by step guide tutorial
You cannot re-create matching keys, that would defeat the whole purpose of them. You need to find the old keys or start the signing procedure from scratch.
Are you using the same machine that you generated the keys on? If not, go to the other machine, export the developer profile, then import it on the new machine.
Can you restore the keys from backups? If not, stop everything you are doing and configure your computer for backups before you do anything else.
If you are really stuck, you will have to follow the signing procedure right from the very beginning, where you request a certificate from a certificate authority. This will generate new keys, and you will have to create matching provisioning profiles, then set your application to be signed with these. Dlete the old provisioning profiles, they will be useless without the old keys.
You need to lock keychain. Please see screenshot:
Required reading when you're having code signing problems:
Technical Note TN2250: iOS Code Signing Troubleshooting
Nothing will help you more than really understanding what's in your certificates and what isn't, where the necessary pieces are kept, and how they're used. This isn't the last time that you'll have code signing issues, and this tech note provides a long checklist that should help you make sure that everything is in the right place to help you develop your app and ultimately sign and submit it to the app store.
When I've had this problem in the past I've just deleted everything on my local machine and started again. So:
Delete the keys associated with your developer account in Keychain access.
In XCode open the 'Organizer' (window->organizer)
In Devices (top menu) and Provisioning Profiles (left menu), select all of the profiles and delete them.
Now hit refresh. It will ask you to sign in and whether you want to generate new keys etc, select yes and wait.
I find that this is the quickest way to fix any provisioning / key problems, as you can spend hours finding that you've missed something small.
After removing all old provisioning profiles (~/Library/MobileDevice/Provisioning Profiles/) and updating xCode, the certificates can be found again.

'No valid code signing identity found' error

I know this is flogging a very dead horse, trust me I've gone through every question on here and tried everything that's been advised. No beans. I'm missing something my brain is not capable of seeing.
So, my app is ready for release version 1 (thanks for all the help btw) and I'm going through the pain of uploading it for Apple to reject ;) I started the app on another machine, so I exported my private key and imported it to my new system. I then created a distribution profile and installed that, only to get the message of hate from Xcode. After 8 hours of shouting I decided to revoke my certificate, delete all my profiles and go to bed. This morning I created a new developer certificate on my new system, created a new provision profile, and installed everything. I can run my app on my device, all good (in fact, better than good, some warnings vanished).
But, here it comes, I still get the 'no valid code signing' error when I create a distribution profile.
I've watched several Youtube vids, I do nothing wrong according to them. I read Apple's documentation (which let's be honest is a mess) and I did everything it told me, but it's so vague I probably missed something. And I read through everything I found here, to no avail.
Is there, somewhere, anywhere (please) a step by step walk through which is up to date? Every one I found was Xcode 3 or the screen caps from the dev centre don't match.
I'm going to be heading to the pub if anyone in London wants to join me and shout at Apple for making this such a mess.
Screen caps if it helps?
I find that this Ray tutorial is very well made.
OK, I'm leaving this here for other people who stumble across this nightmare and, like me, are a bit dumb/tired/lack caffeine.
After revoking and re-creating my developer certificate, I had not revoked and re-created my distributor certificate. I thought I had, the dates matched (today) but in fact I hadn't. I re-created that, and all was good. This may have been a bug, or it may have been me, or a bit of both. But re-creating the distributor cert AFTER re-creating the developer cert fixed it.
If you are getting this error after upgrading to iOS8 / xcode6, you will need to manually sign in with your appleID to the member center and downloaded the certificates directly. Then add them to your keychain and you are off to the races again.

Ad Hoc distribution for beta testing xcode 4.3

After following the great tutorials from http://www.raywenderlich.com/ on how to submit your app to the app store from square one I started planning my beta test program.
I'm not going to get into details of everything that wen well but of what I'm dealing with right now.
I've read many many posts on how to create provisioning profiles for ad hoc distribution of my app to beta testers. I've focused on those helping user get the app over the air (OTA) after a forum recommendation.
I also know now that TESTFLIGHT is out there but I can't use it this time.
Everything works well except the part where the application actually gets installed on my device. I keep getting the error "Unable to Download Application" after a few seconds of pressing "Install".
There are several possibilities and combinations of certificates, profiles, signatures, and here is where I think I'm doing something wrong. I'd like to show you what I have and what I've done and maybe your experienced eyes can spot my missing step or misconfiguration.
On the iOS Provisional Portal:
1) Ad Hoc distribution profile with a couple of devices:
2) After I download and install my certificates (I've create a couple of each for testing purposes):
3) On my xCode's project configuration:
4) When I generate the archive:
5) I upload everything to my server and then try to get the .ipa to install on my iPhone (which is one of the two devices included on the profile)
And finally I get this:
What could be wrong?
The only difference I can see is in the CodeSigning, ensure both lines under Adhoc point to your certificate.
Second thing to verify: You did not mention the plist that is created during the "Save for Enterprice". Did you upload that to your server, too? And does your link point to this plist? Check out this answer for the plist stuff: How to send the build to already provisioned remote person's iPhone
I've had this exact problem even where, like you (as far as I can tell), everything is done right.
What I discovered is that if you've EVER had the url to the plist file or the app file incorrect then your iPhone will always fail to install. There's some kind of cacheing going on where the phone fails to download the updated plist file if it's previously downloaded an incorrect one.
The fix I've used is to try a different phone (that hasn't cached a previous version), or to make a new version at a different URL. Sounds crazy, but it worked for me!
We have also faced with this problem couple of times and possible reasons might be;
Due to the screen shots, did you upload your files to exact location "http://www.becomingapps.com/en/ota/" location? When you give this URL during enterprise export.
Second possible reason we have seen is mismatched App Id's.
In case you haven't solved your problem, I think you can't use a wild card in your ad hoc profile. It should have the full ...com.becomingapps.dilemma signature.
You also have to upload both the icons, but I'm assuming you did that since your screenshot shows a custom icon.
It's worth the effort to get this working, my customers love it.

Resources