Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

xcode 4.2, code signing for distribution

I have finished coding my app and have spent the last 2-3 days on figuring out why and what I am doing wrong with building an archive to be uploaded to apple app store.

1 - I verified that my new app is in "Waiting for Upload" state.

2 - I have download and double click on the WWDR intermediate certificate. Verified that this exist in my key chains.

3 - I verified that my distribution certificate is not expired. It's expiration date is a year from today. Its status is "Issued"

4 - I have created app id. I verified that the app name space portion is exactly the same as my application name space. The states that this app is in are: - push notification: configurable (yellow) - in app purchase: enable (green) (i want to turn this off, but there's no way to) - game center: enable (green) (i want to turn this off, but there's now way to) - iCloud: configurable (yellow)

5 - I have verified that my distribution provision is "Active" for the correct application id.

6 - i have downloaded and installed and installed all 3 where they belong: a - WWDR intermediate certificate b - Distribution certificate c - Distribution provisioning profile

I have Xcode 4.2 with IOS 5. I did an update on the app store for the latest version of XCODE 2 days ago.

In Xcode -> organizer - Devices: under "Developer Profile" i have verified that I have the correct provision profile for distribution under "Provisioning Profiles" i have verified that I have the correct provision profile for distribution

in Xcode -> project -> build setting: i have verified that I specified the correct code signing provision under "Code signing Identity" for both debug and release type. debug: i point to my developer provision release: i point to my distribution provision

in Xcode -> target -> build setting i did the same as the project describe above.

I left "Code signing entitlements" blank I left "code signing resource rules path" blank i left "other code signing flags" blank

I modify the schema for "iOS device" for "archive", i specified: "release" under "build configuration" "nameOfMyApp" under "archive name" i have checked "reveal archive in organizer"

I made sure that my project is compile for all static library.

I then click on "Product" -> "Archive"

The project compiled, there was no compilation error. (i verified that my app ran on my iPhone)

Toward the end of the archiving a window for codesign pop up. the message says in exact letters: "codesign wants to sign using key "" in your keychain." I allow it. (is "" suppose to have some other name other than "key"?)

After I click allow, I see "build succeeded"

I go to the organizer -> Archives, I do not see any item under this section. the organizer shows "No Archives" for the left pane. and the main panel.

I go to the path where the archive would be shown, I see the archived file, but the size is "Zero byte"

So I search this forum for help, and someone posted a link to a guide: https://developer.apple.com/legacy/library/technotes/tn2250/_index.html#//apple_ref/doc/uid/DTS40009933

I went over this link in very good detail, but still NO luck.

I've been on this issue for a very long time and it's driving me mad and crazy. There are no error returned, thus I have no idea how to fix this issue.

Would someone help me out?

Also is there a phone number that apple provide to support issue like this? If there is, please provide it here.

After 3 months of development, my app is done and just sitting on my computer and not on the app store. sigh......

like image 688
Daniel Nguyen Avatar asked Oct 17 '11 18:10

Daniel Nguyen


People also ask

What is code signing entitlement Xcode?

During code signing, the entitlements corresponding to the app's enabled Capabilities/Services are transferred to the app's signature from the provisioning profile Xcode chose to sign the app. The provisioning profile is embedded into the app bundle during the build.

Where is Code Signing Identity in Xcode?

In Xcode an integrated development environment (IDE), it appears as an option in the build setting as a list option from which developers can select the Identity to be used for CodeSign.


2 Answers

The method you described deviates a little from the method that I just recently used. Try following this guide:

http://www.touch-code-magazine.com/how-to-upload-an-app-to-the-app-store-with-xcode-4/

It worked perfectly for me and seems to be a different method than what you did. It uses the xcode interface directly to go all the way through the upload process. (aka, you don't need to manually upload the file via your internet browser)

EDIT:

Also try: http://www.weston-fl.com/blog/?p=2442

like image 193
USS1994 Avatar answered Sep 28 '22 16:09

USS1994


I had the same issue when I archived the app, I got the message "codesign wants to sign using key <key> in your keychain." <key> should have been 'my distribution certificate name', went to all the steps what could be wrong:

  • distribution certificate was correct in keychain
  • deleted all old certificates
  • checked if the mobileprovision was valid in terminal

but that didn't work. Finally contacted apple support and pointed me to https://developer.apple.com/legacy/library/technotes/tn2250/_index.html --> Configuration Troubleshooting

Followed these steps (see for more details the link):

  • deleted all distribution certificates in keychain
  • also deleted provisioning profiles
  • revoked the certificate on the developer account site
  • created new certificate
  • renewed distribution provision files (on the site)
  • downloaded and dragged/dropped the new certificate and provision file in xcode

Note: In the troubleshoot session it says you can renew using Xcode, I did not work for me as I got the message that "There is already a certificate request pending", manually did the trick...

like image 37
Vincent Wegener Avatar answered Sep 28 '22 17:09

Vincent Wegener