Understand and solve code signature Problems

Source: Internet
Author: User

Understand and solveCodeSignature Problems

(To maintain the development environment andAppleDeveloperCommunityWebsite structure, some terms are not translated)

Vast majorityIPhone developer/DistributionThe error is caused by the certificate andProvisioning profilesThe installation is not correct on the development system. This article describesIPhone OSApplicationProgramFiles and how to install them. This technology is described"Program User Guide"Provide support,Program User GuideYou canPortal ResourcesUnder IPhone developer program provisioning Portal Find. If youIPhoneDevelopment is just getting started. Please read it firstProgram user guide.

What do I need?

AllIPhoneApplication inIPhone OSThe device must use validSigning identity.

In orderIPhone OSThe application signature for device development requires:

Private Key

IPhoneDeveloper Certificate

Development provisioning Profile

UpperApp StoreRequired:

Private Key

IPhone DistributionCertificate

App Store distribution provisioning Profile

To useAd hocYou need:

Private Key

IPhone DistributionCertificate

Ad hoc distribution provisioning Profile

The private key is used to generate an authentication signature request (CSRCreatedCSRAfter submission and approval, you can IPhone developer program provisioning Portal To create and download certificates andProvisioning profiles.

Note:To better differentiateProvisioning Profile, Pay attention to the name when creating, such"Wild Card Dev profile", "MyApp push distribution profile", "ad hoc testers profile"And so on.

Functions of these things

Signing identityPrivate EncryptionKeyAnd digital certificate. InIPhone OSUnder development,XcodeUse the private key to sign the program.IPhone OSRun or submit on the development deviceApp Store.

Public Key inclusionIPhoneDeveloper/The publisher certificate used to authenticate signed programs.

Provisioning pfofilesUsed to notifyXcodeCertificate used/Private Key combination to sign the program. The development device also determines how to authenticate the program installed on the device.

Certificate-Install/Verification

DownloadIPhone DevelopmentCertificate orIPhone DistributionAfter the certificate is downloaded, double-click. CerFile startupKeychain accessAnd install the certificate. Select"Login" keychain.

To determine whether the certificate is correctly installed, select"Login" keychainAnd select"My certificates"Category. If you want to deploy it to your development device, select"IPhone developer Certificate"The certificate that starts with the title. To publish a program, select"IPhone Distribution Certificate"The certificate starting with the title. InInformation viewThere should be a green circle with the selected sign to tell you that the certificate is valid, meaningWWDR intermediate CertificateThe certificate has been installed in the system and verified. If you cannot see the green circle, you shouldIPhone developer program provisioning PortalDownloadWWDR intermediate CertificateAnd like installationIPhone developerOrDistribution CertificateThen install it. 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"My certificates"Category. The private key is required to sign the program."My certificates"There is still no small triangle, you need to make a waste certificate and create and submit a newCSRCreate 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 generate a newPfofiles. It is recommended that you delete the old certificate from the development machine and device before copying the new certificate./Configuration File obfuscation. This does not affectApp Store.

Warning:InstallIPhoneDo not change the default"Use system defaults"Trust settings. If the trust setting is not'Use system defaults'When the application is generated,Cssmerr_tp_not_trustedSignature error.

Provisioning profiles-Install/Verification

ToIPhone developer program provisioning PortalDownloadedProvisioning ProfileTo install it on the development machine, you must first startXcodeThen click"WINDOW> organizer"To openOrganizer. SetProvisioning ProfileDrag to mark"Provisioning profiles".

For development purposesProvisioning Profile, You also need to install it on the development device. InIPhone OSWhen the device has been inserted into the computerDevicesSelect a device under the triangle, and thenOrganizerDevelopmentProvisioning ProfileDrag it in. In this caseProvisioning ProfileInstallIPhone OSDevice.

Note:Ensure installation on Development devices andMacInDevelopment provisioningIt is very important to successfully generate and install the test program.

Note:AndDevelopment provisioning profilesDifferent,App Store distribution provisioning profilesCannot be installed onIPhone OSDevice. UseApp Store distribution provisioningThe generated program is usedITunes connectUploadApp Store.

To tellXcodeUsedProvisioning Profile, OpenXcodeProject, openTarget build settings, ScrollCode signing. InCode signingThe region has a small triangle.Code signing identity. Are you sure you want to set it to anyIPhone OSDevice.ValueClick the pop-up menu and selectProvisioning Profile. We recommend that you select"IPhone developer"To publish, we recommend that you select"IPhone distribution". These are all in the pop-up menu"Auto matic profile selector"Area, so thatXcodeTo find the correctProvisioning Profile.

Note: if it is lostIPhone devloper/DistributionThe private key of the certificate.Provisioning Profile. Import from backupIPhone developer/DistributionThe private key of the certificate can solve this problem. If the private key is lost or deleted, a newCSRAnd download the newIPhone developer/DistributionCertificates andProvisioning Profile.

ProgramBundle identifierMust followProvisioning profilesOfBundle identifier app IDMatch. TheBundle identifier, OpenTarget's properties settings, InIdentifierField InputBundle identifier. IfAPP IDOfBundle identifierWith the asterisk wildcard, you can replace it with a reverseDNSCharacters.

You can enterIdentifierBox example.

IfAppidYesA1b2c3d4e5.com. domainname. applicationname. InputCom. domainname. applicationnameAsBundle identifier

AppidYesA1b2c3d4e5 .*, Input InverseDNSFormat StringBundle identifier.

AboutProfilesAndAPP IDS

CreateProvisioning profilesTwo typesAPP ID. The first type is genericAPP ID(Wildcard app ID). Recommended majorityIPhone OSGeneral developmentAPP IDOfProvisioning profilesBecause such a single commonAPP IDCan be used to generate and install most programs, includingIPhone reference libarySample Code in. GeneralAPP IDInIdentifierEnter the asterisk to create. The asterisk must beAPP IDThe last character of the string. If commonAPP ID, RememberXcodeProject InputBundle identifierReplace asterisks with reverseDNSFormat.

Assume thatApp id abcde12345 .*:

Abcde12345YesBundleSeedID (ByAppleGenerate)

*YesAPP IDOfBundle identifier. InXcodeInputBundle identifierThe asterisk must be replaced with a reverse asterisk.DNSFormat.

Assume thatApp id: abcde12345.com. yourcompany .*

Abcde12345YesBundleSeedID (ByAppleGenerate)

Com. yourcompany .*YesAPP IDOfBundle identifier. AndXcodeProjectBundle identifierMust start'Com. yourcompany .'The asterisk can be replaced with any string.

Category 2APP IDIt is called fixedAppid (explicit app ID). This typeAPP IDOnly oneProvisioning ProfileOnly one program can be installed. EnableIPhone OS 3.0Fixed featuresAPP IDFor exampleIn app purchaseOrAPP push notificationService. FixedIDCreate by entering a specified string. We recommend that you use reverseDNSFormat.

Important:A prompt to avoid problems in the future: ModifyYourcompanyIs the real name.

Ad hoc

IsAd hocPublish and generate an applicationApp StoreThe program is similar, but there are two more steps. First, you need to useIPhone developer program provisioning PortalCreateAd hoc distribution provisioning ProfileAnd addUdid. Second, create a code signature.Entitlements File. About how to createEntitlements FilePlease readIPhoneDeveloper Guide Managing application entitlements. CreatedEntitlements FileAnd add itCode signing entitlements build settingsOpenEntitlements FileAnd field or editingGet-task-AlloSet itFalse.

Document revision history

(Original revision Records)

2010-04-13: New. IntroductionIPhoneInstall the certificate andProvisioning profiles.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.