Code sign error during archiving the proejct in xcode - iphone

I am trying to build ipa for the purpose of testing using Ad Hoc. When I tried to archive this is the error I am getting
Code Sign error: The identity 'iPhone Developer' doesn't match any valid certificate/private key pair in the default keychain
I dint create any keys. Do I need to create one? Is there any good page to follow the steps? And which is the simplest way for testing iphone app?
FYI I am using xcode 4
Thank you

From HOWTO: Obtaining your iOS Development Certificate:
In the ‘Certificates’ section of the iOS Provisioning Portal, you can
request individual iOS Development Certificates. All iOS applications
must be signed by a valid certificate before they can be run on an
Apple device. In order to sign applications for testing purposes, Team
Members need an iOS Development Certificate.
A digital identity is an electronic means of identification consisting
of a secret "private key" and a shared "public key". This private key
allows Xcode to sign your iOS application binary.

Related

Xcode 8 export archive for client

I developed an iOS (the swift based) application for my client. I have enrolled Apple developer program and my client have different one too. My client want from me the Xcode archive, which he can publish on AppStore (he need to re sign with his certificates). He send me his provisioning profile, but I'm unable to generate the Xcode archive. It fails with:
No signing certificate "iOS Distribution" found: No "iOS Distribution" signing certificate matching team ID "XXXXXXX" with a private key was found.
I also tried to disable code signing in iOS SKD but this is not helping.
How can i solve this problem?
Your client needs to send you his iOS Distribution Certificate (exported from Keychain with his private key) and then you can archive from your xcode.
If he don't know how to do that, he can simply give you access to his Apple developer account (a limited developer access is enough) and then you can generate the iOS Distribution certificate by yourself.
I solve this problem as is written above. Client made me part of his team. So I can set provisioning and signing certificate from his team. Now I was able to generate Xcode archive and send him to my client.

Distribute multiple Enterprise Apps

I am having Code signing error while distributing second enterprise (when i do Product - Archive)iPhone app. It says
Code Sign error: Certificate identity 'iPhone Distribution: XYZ, Inc.' appears more than once in the keychain. The codesign tool requires there only be one.
I have -
Apple Enterprise License
Created Enterprise Distribution Certificate
Created Separate App ID for each app
Created Enterprise Provisioning profile for each app
With this my first app works fine. The second app has code sign issue. In Xcode Organizer all profiles are valid and i can select correct provisioning profile from Build Settings but it is throwing above error when i do Product - Archive.
Open keychain on your MAC. Look at certificates. If you see multiple instance of 'iPhone Distribution: XYZ, Inc', expand and check if the key is available and the date for the two, delete one of them which is not needed. Lock the changes on keychain. Then retry archiving your app.

first try to create archive to test , getting Code Sign error: The identity 'iPhone Developer' doesn't match any valid

I followed this tutorial.
Just to try and test my ever first app in my iphone , but when creating the app in archive I get the error :
Check dependencies
The identity 'iPhone Developer' doesn't match any valid, non-expired certificate/private key pair in your keychains
in the Scheme I selected the iOS Device .
What am I doing wrong ?
In Navigator click on your project, then choose your Target and in Build Settings look for Code Signing.
In Code Singing Identity you can set your developer certificate/provisioning profile which will be use to sign you archive.
As fas as I'm concerned most used configuration is:
Debug: iPhone Developer: your_name from iOS Team Provisioning Profile
*
or
iPhone Developer: your_name from com.company.appBundle
(it depeneds how to generated Provisioning Profiles in developer.apple.com)
and for
Release: iPhone Distribution from com.company.appBundle
especially when you are using iCloud or In-App Purchases (even if you are testing your app).
P.S
When deploying to TestFlight you can sign your app with Ad Hoc profile.
When depolying to iPad you are still using "iPhone Distribution Prov. Profile".

Three20: Application failed codesign verification

I've just made an iPhone app which includes Three20 library. I have no problem with building & running the app on device. I have no error when I build the app for distribution but when I submit the app via ApplicationLoader, I get the error "Application failed codesign verification. The signature was invalid, or it was not signed with an Apple submission certificate.". I don't think I have any mistake when building because I have built many apps for distribution with the same distribution certificate & provisioning. I tried with a simple app with Three20 included and I had the same issue. So I guess this kind of error may related to Three20. I also tried to change all projects of Three20 to distribution configuration, configure the same provisioning profile as in my main project, compile all these projects one by one and then build the main project, but ... NO LUCK :(
Private Key
Do you have the private and public keys (both) in your KeyChain (ie. /Applications/Utilities/Keychain Access.app)? Note that the private and public keys are linked to the mobile provisioning profile (distribution) that you use to sign the binary in Xcode for app distribution. You need the mobile provisioning profile and private key for code signing.
Also, the private key is tied to your user account on the Mac. I believe the private key may be invalidated if you change your account name or reinstall the OS. Make sure you sign with they haven't expired (or revoked).
Certificate Authority
Make sure you have the Apple Worldwide Developer Relations Certification Authority in your Keychain and the cert hasn't expired.

Xcode iPhone project Code Signing error

Whenever I try to build my iPhone app in Xcode 3.2.1 I get an error that says:
Code Sign error: The identity 'iPhone Distribution: foo' doesn't match any identity in any profile
This is a distribution certificate, however it worked perfectly with a developer certificate.
I have revoked and installed all of my iPhone certificates, and Google hasn't been of much help either. How can I build my app without this error?
This looks similar to an earlier question, that says you need to generate a new provisioning profile for your new certificate.
EDIT:
From looking at the Code Sign error, it seems it is trying to match up your distribution certificate with a provisioning profile.
I have not yet distributed an app to the App Store, but it seems you have to create an "App Store Distribution Provisioning Profile". See this doc from the Apple Developer Connection.