Resolve and resolveIPhone DevelopmentCodeSignatureThe problem is what this article will introduce.IPhoneDeveloper/Distribution codeSignatureThe error is generated because the certificate and Provisioning profiles are not correctly installed on the development system.
This article describesIPhoneThe files required for the OS application and how to install them. This technical instruction provides support for the "Program User Guide". The Program User Guide can be found at the iPhone Developer Program Provisioning Portal under Portal Resources. If youIPhoneThe development is just getting started. Please read the Program User Guide first.
What do I need?
All iPhone applications must be signed with a valid signing identity before running on the iPhone OS device.
To sign an application on your iPhone OS device, you need:
Private Key
IPhone developer Certificate
Development Provisioning profile
For App Store:
Private Key
IPhone Distribution Certificate
App Store Distribution Provisioning profile
To use Ad Hoc, you must:
Private Key
IPhone Distribution Certificate
Ad Hoc Distribution Provisioning profile
The private key is created when the CSR is generated. After the CSR is submitted and approved, you can create and download the certificate and Provisioning profiles in the iPhone Developer Program provisioning Portal.
Note: To better differentiate different provisioning profiles, pay attention to the names when creating them, such as "wild card dev profile" and "MyApp Push distribution profile ", "Ad Hoc Testers profile" and so on.
Functions of these things
Signing identity consists of private encryption keys and numbersCertificate. In iPhone OS development, Xcode uses the private key to sign the program, so that the program can be run on the iPhone OS development device or submitted to the app store.
Public Key inclusionIPhone DevelopmentPublisher/publisherCertificate,Used for authenticationSignatureProgram.
Provisioning pfofiles is used to tell Xcode which one to useCertificate/Private Key combination to sign the program. The development device also determines how to authenticate the program installed on the device.
Certificate-installation/Verification
After downloading the iPhone Development certificate or iPhone Distribution Certificate, double-click the downloaded. cer file to start Keychain Access and install the certificate. If you ask where to install the certificate, select "login" keychain.
To determine whether the certificate is correctly installed, select "login" keychain and select "My Certificates" category. If you want to deploy the Certificate to your development device, select a Certificate starting with "iPhone Developer Certificate. To publish a program, select a Certificate starting with "iPhone Distribution Certificate.
In the Information view, there should be a green circle with the selected logo to tell you that the Certificate is valid, that is, WWDR Intermediate Certificate has been installed in the system and the Certificate has been verified. If you cannot see the green circle, you should download WWDR Intermediate Certificate from the iPhone Developer Program Provisioning Portal and install it like installing iPhone Developer or Distribution Certificate.
There is a triangle next to the selected certificate. Click it to display the private key associated with the certificate. If not, check if you are in the My Certificates category. To sign a program, you must use a private key. If it is in My Certificates and there is no small triangle, you need to create and submit a new CSR to create a new private key and certificate.
Note: If a new private key or certificate is created, the configuration file associated with the old certificate becomes invalid. You need to regenerate the new pfofiles. It is best to delete the old certificate from the development machine and device before copying the new certificate, so as to avoid confusion between the new certificate and configuration file. This does not affect the programs already in the app store.
Warning do not change the default "Use System Defaults" trust setting after installing the iPhone certificate. If the trust setting is not 'use System defaults', A CSSMERR_TP_NOT_TRUSTED is obtained when an application is generated.SignatureError.
Provisioning Profiles-installation/Verification
To install the Provisioning Profile downloaded from the iPhone Developer Program Provisioning Portal to the development machine, start Xcode and click "Window> Organizer" to open Organizer. Drag the provisioning profile to the region marked as "Provisioning Profiles.
To install Provisioning Profile for development, you also need to install it on the development device. When the iPhone OS device has been inserted into the computer, select the device under the Devices triangle, and drag the provisioning profile Development in the Organizer. In this case, the Provisioning profile is installed on the iPhone OS device.
Note: ensure that the Development Provisioning installed on the Development device and the Mac is exactly the same. It is very important to successfully generate and install the test program.
Note: unlike Development Provisioning Profiles, App Store Distribution Provisioning Profiles cannot be installed on iPhone OS devices. The program generated by App Store Distribution Provisioning is used to upload data to App Store through iTunes Connect.
Tell Xcode which Provisioning profile to use, open the Xcode project, open Target build settings, and scroll to Code Signing. There is a Code Signing Identity with a small triangle in the Code Signing area. Are you sure you want to set it to any iPhone OS device? Click the pop-up menu in the Value column and select the Provisioning Profile to use. We recommend that you select "iPhone Developer" and "iPhone Distribution" for development ". These are all in the "Auto matic Profile Selector" Area of the pop-up menu, so that Xcode can find the correct Provisioning Profile for you.
Note: If the iPhone devloper/Distribution is lostCertificateYou cannot selectCertificateThe associated Provisioning Profile. Import iPhone developer/Distribution from backupCertificateTo solve this problem. If the private key is lost or deleted, you must generate a new CSR and download the new iPhone Developer/Distribution.CertificateAnd Provisioning Profile.
The Bundle Identifier of the program must match the Bundle Identifier app id of Provisioning profiles. To edit the Bundle Identifier of the program, open target's properties settings, and enter Bundle Identifier in the Identifier column. If you use the asterisk wildcard in the bundle identifier of the App id, you can replace it with a character in reverse DNS format.
The following are examples that can be entered in the Identifier box.
If the AppID is A1B2C3D4E5.com. domainname. applicationname. Enter com. domainname. applicationname as Bundle Identifier
AppID is A1B2C3D4E5. *, and the string in reverse DNS format is entered as Bundle Identifier.
About Profiles and App IDs
When creating Provisioning Profiles, You can associate two types of App IDs. The first type is called the General App IDWildcard App ID ). We recommend that you use Provisioning Profiles for general App IDs for most iPhone OS development, because a single general App ID can be used to generate and install most programs, including the sample code in iPhone Reference Libary. A common App ID is created by inputting an asterisk in Identifier. The asterisk must be the last character of the App ID string. If you use a common App ID, remember to replace the asterisk with the reverse DNS format when you enter the Bundle Identifier in the Xcode project.
Suppose there is an App ID ABCDE12345 .*:
ABCDE12345 is the Bundle seed ID (generated by Apple)
* Is the Bundle Identifier of the App ID. When you enter bundle identifier in xcode, replace the asterisk with the reverse DNS format.
Suppose there is App ID: ABCDE12345.com. yourcompany .*
ABCDE12345 is the Bundle seed ID (generated by Apple)
Com. yourcompany. * is the Bundle Identifier of the App ID. In addition, bundle identifier in xcode must start with 'com. yourcompany. '. The asterisk can be replaced with any string.
The second type of App ID is called the fixed AppID (Explicit App ID ). This type of app id limits a provisioning profile to allow only one program to be installed. To enable the iPhone OS 3.0 feature, you must set the App ID, for example, In App Purchase or App Push Notification. A fixed ID is created by entering a specified string. We recommend that you use reverse DNS format.
Important: A reminder to avoid future problems: Change yourcompany to a real name.
Ad Hoc
Generating an application for Ad Hoc publishing is similar to generating an App Store program, but two more steps are required. First, you need to use the iPhone Developer Program Provisioning Portal to create an Ad Hoc Distribution provisioning Profile and add the UDID of the target device to be released. Second, create a codeSignatureEntitlements file. For more information about how to create Entitlements file, see the management Application Entitlements Section of the iPhone developer guide.
After creating the Entitlements file and adding it to Code Signing Entitlements build settings, open the EntitleMents File and set it to false in the field or edit get-task-allo.
Summary: resolve and resolveIPhone DevelopmentCodeSignatureI hope this article will help you!