Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

jerrywickey

macrumors member
Original poster
Apr 16, 2009
81
0
Key West
My app is complete. I want to submit it to the app store.

From iPhone Dev Portal > Distribution > Prepare App (tab)

I Obtained my iPhone Distribution Certificate.

I Created and downloaded my iPhone Distribution Provisioning Profile for App Store Distribution.

I am attempting to Build my Application with Xcode for Distribution, but am stuck when attempting to select the iPhone Distribution Certificate/Provisioning Profile from the ‘Code Signing Identity’ field in the ‘Build’ pane of the Target Info window of my app.

The private key for my iPhone Distribution certificate is missing, despite the fact that I downloaded it and dragged and dropped it in XCode on the dock. It is in my KeyChain application.

There is a note in the Distribution instructions which reads:
Note: If the private key for your iPhone Distribution certificate is missing, you will be unable to select the iPhone Distribution Certificate/Provisioning Profile pair and you will see the following. Importing the private key for your iPhone Distribution certificate will correct this.

I do not see the following "Importing the private key for your iPhone Distribution certificate will correct this."

I see instead "Matching Certificate Identity with Private Key not found in log in Key Chain"

My question: How do I import my iPhone Distribution certificate? I find no instructions to do so.

Although, I found the Keychain Access app and confirm that the private and public 2048 bit, RSA keys which I created are in the login Keys. I am not familiar with exactly what a "Key Chain" is or how it is used.

Thanks for anyones help

Jerry
 

jerrywickey

macrumors member
Original poster
Apr 16, 2009
81
0
Key West
Yup. I thought about that. In fact I restarted the whole machine. Any other thoughts. Perhaps, tell me just exactly what a keychain is and how the app uses it.

Jerry
 

firewood

macrumors G3
Jul 29, 2003
8,113
1,353
Silicon Valley
I've forgotten how this works, but...

Did you drop your iPhone Distribution Certificate on the Keychain?
(Check to make sure there are no duplicate keychain items.)

Did you drop your iPhone Distribution Provisioning Profile on Xcode and restart?
(You can check using spotlight to see if Xcode actually "took" it.)

Are you actually in your build setting for Distribution?
(I think you have to select this in 2 or 3 places to be symmetric.)
 

jerrywickey

macrumors member
Original poster
Apr 16, 2009
81
0
Key West
Thank you for the good suggestions.

I checked keychain. No dups and Apple World Wide Developer Certificate appears in login certificates.

I checked spotlight in Xcode with the phrase "cert" found nothing. What should I be looking for?

I am in the build pane for both target and project. Both are same and both give me " Matching Certificate Identity with Private Key not found in log in Key Chain"

Suggesting the XCode certificate private key does not match any in the login key chain.

What exactly does that mean? And how would I find which key is in the XCode. I could be completely wrong but I think that is the problem. Somehow I am not getting the keys to XCode.

here is a note in the Distribution instructions which reads:
Note: If the private key for your iPhone Distribution certificate is missing, you will be unable to select the iPhone Distribution Certificate/Provisioning Profile pair and you will see the following. Importing the private key for your iPhone Distribution certificate will correct this.

Any one know how do I import my iPhone Distribution certificate?

Jerry
 

jerrywickey

macrumors member
Original poster
Apr 16, 2009
81
0
Key West
I dropped it in again with the same results.

I restarted the computer. Dragged and dropped the file I downloaded from the developers portal myApp.mobileprovison into the XCode icon on my dock.

That also started XCode automatically. I quite XCode and restarted the computer again before attempting to build my project for distribution. But not to my surprise the same message appeared in the build pane of the project info window.

"matching certificate identity with private key not found in login keychain"

Checking the Keychain Access application, I find in login keychain

"Apple Worldwide Developer certificate"
and
Jerry Wickey "private key" and "public key"

Perhaps, I don't have the correct key. I think I followed the developer portal instructions correctly. If I follow them again and produce more keys, will that mess something up?

Jerry
 

jerrywickey

macrumors member
Original poster
Apr 16, 2009
81
0
Key West
Good thought. I can see how that makes sense,

However, AAAAARG! Still no joy! Same message in the build pane.

" Matching Certificate Identity with Private Key not found in log in Key Chain"


Can I follow the instructions to create a new key with out messing anything up?

Perhaps I am dragging, dropping, messing with the wrong key? .mobilprovision is the extension. Which is the correct key or file?

---------And... I thought writing the app was the fun part....

Jerry
 

simplymuzik3

macrumors 6502a
Jan 29, 2009
590
0
So does anyone have a fix to this? I am having the exact same problem as the OP, and I still haven't found a way to fix it!
 

Saladinos

macrumors 68000
Feb 26, 2008
1,845
4
The certificate is not installed in your keychain. Double click it and add it to your "login" keychain. Then you can select it from XCode.
 

DaveP

macrumors 6502a
Mar 18, 2005
506
433
I once had an issue with it being on the wrong keychain (system vs login).
 

brofski

macrumors newbie
Jun 4, 2006
11
0
Seattle, WA
yep, having the same exact problem.

1. this was all working with no problems
2. added 2 new devices in program portal
3. created a new provisioning profile
4. installed new profile

in build settings...
matching certificate identity with private key not found in login keychain

now comes the super weird part. XCode's build settings let me pick the original provisioning profile no problem... and both profiles are using the same certificate! in fact, it's the only certificate we have. it's installed in the keychain under "login" and has a valid private key. i can prove it by switching to the original profile.
 

jerrywickey

macrumors member
Original poster
Apr 16, 2009
81
0
Key West
OK I got it solved.

I used a different email address to create two of the elements. I now have the *.app file and the *.mobileprovision file.

I want my friend to test the app on his iPhone as well. I succesfully created a provisioning file for his iPhone and its id number

But he is out of town right now. He isn't here so I can plug his phone into my Xcode. and he doesn't have Xcode

Can I email him his provisioning file and the *.app so that iTunes can install if?

If so, exactly which provision or certification file and exactly which app file?

Jerry
 

jerrywickey

macrumors member
Original poster
Apr 16, 2009
81
0
Key West
I think I got it.

I found the app in both .app and already .zip ed Am I right? Is that the app ziped for ease of emailing?

I guess I will find out tomorrow when my buddy downloads and attempts to install.

Jerry

Simplymuzik,

my problem was using two different emails. but I only think that was the case. Its just that I think one of the dialogs used a default email and I don't remember checking it.

When I redid everything, I was looking out for email because I remember reading something about it. Maybe your problem is the same. I don't know.

Jerry
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.