App Store Distribution

Discussion in 'iOS Programming' started by jerrywickey, Jun 6, 2009.

  1. jerrywickey macrumors member

    Joined:
    Apr 16, 2009
    Location:
    Key West
    #1
    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
     
  2. fishkorp macrumors 68020

    fishkorp

    Joined:
    Apr 10, 2006
    Location:
    Ellicott City, MD
    #2
    Did you restart XCode? Every time I drop a new profile in I need to restart XCode for it to pick it up.
     
  3. jerrywickey thread starter macrumors member

    Joined:
    Apr 16, 2009
    Location:
    Key West
    #3
    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
     
  4. firewood macrumors 604

    Joined:
    Jul 29, 2003
    Location:
    Silicon Valley
    #4
    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.)
     
  5. jerrywickey thread starter macrumors member

    Joined:
    Apr 16, 2009
    Location:
    Key West
    #5
    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
     
  6. firewood macrumors 604

    Joined:
    Jul 29, 2003
    Location:
    Silicon Valley
  7. jerrywickey thread starter macrumors member

    Joined:
    Apr 16, 2009
    Location:
    Key West
    #7
    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
     
  8. dejo Moderator

    dejo

    Staff Member

    Joined:
    Sep 2, 2004
    Location:
    The Centennial State
    #8
    Try dropping into into iTunes. Then restart Xcode. That usually works for me. I've never gotten dropping into Xcode to work.
     
  9. jerrywickey thread starter macrumors member

    Joined:
    Apr 16, 2009
    Location:
    Key West
    #9
    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
     
  10. simplymuzik3 macrumors 6502a

    Joined:
    Jan 29, 2009
    #10
    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!
     
  11. Saladinos macrumors 68000

    Saladinos

    Joined:
    Feb 26, 2008
    #11
    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.
     
  12. DaveP macrumors 6502

    DaveP

    Joined:
    Mar 18, 2005
    #12
    I once had an issue with it being on the wrong keychain (system vs login).
     
  13. brofski macrumors newbie

    Joined:
    Jun 4, 2006
    Location:
    Seattle, WA
    #13
    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.
     
  14. jerrywickey thread starter macrumors member

    Joined:
    Apr 16, 2009
    Location:
    Key West
    #14
    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
     
  15. jerrywickey thread starter macrumors member

    Joined:
    Apr 16, 2009
    Location:
    Key West
    #15
    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
     

Share This Page