App Certificate and IPA package

Source: Internet
Author: User

If you want to test your iOS app on your iOS device, or on someone else's iOS device, or want to publish to the App Store, sign the app first. A certificate is required for signing, which requires the process of applying for a certificate.

To put your own application in the device, there are several main ways:

① connect the iOS device to the computer so that you can select the device in the upper left corner of Xcode, then click Run and the program will be installed on this iOS device. This is mainly used to test the program on the real machine. The premise is that the profile containing this device information is added to Xcode.

② uses Xcode to package the application in ad hoc mode, export the IPA file, and then install the app to an iOS device using tools such as itunes. The profile file used in this way is the ad hoc type and contains information for the specified device. The exported IPA file can also be installed only on the specified device.

③ the app to the App Store, and when it's approved by Apple, someone else can download and install it.

This blog is mainly about the second method. PS: I use the Xcode 4.4.1, the test time is early September 2012. Different versions of Xcode may operate differently. In addition, the Apple developer site may be revised later, the operation process may also change.

1, first to register an iOS developer account, no longer detailed.

2. Run the browser, log in to https://developer.apple.com/, and enter iOS Dev Center:

After entering, click Log in at the top right to enter the developer account and password.

3. After successful verification, the following options appear on the right side of the page:

Click on the top iOS Provisioning Portal, where we apply for certificates, manage certificates, manage devices, and so on in this page. Such as:

4. Run the Keychain Access application in the computer (English name: Keychain access), which is typically in the "Utilities" directory. This program plays a significant role in the process of certificate application and application signing. Many of the problems with signing are in this application, and more typically

CodeSign error:certificate Identity XXX appears more than once in the keychain. The Codesign tool requires there only is one.

A general solution is given later.

5. In the menu, select Certificate Assistant--Request certificate from certification authority ... :

Enter the e-mail and common name in the window that opens, and select Save to disk and let me specify key pair information:

Click Continue, set the file name and location in the open window, click Continue, key size select 2048 bit, algorithm select RSA:

Click Continue, then build in the location you previously set. The signing file for the CSR. The default name is Certificatesigningrequest.certsigningrequest.

6, back to the browser, in the page select Certificates--distribution--request Certificate:

On the page that opens, select the CSR file that you want to upload and submit.

7. When you are reviewing the file you just uploaded, you can click here for download now download WWD Intermediate certificate.

8, refresh the page, download the certificate and install, this will be automatically added to the Keychain Access program.

9. Create an app ID. Select the app ID on the left side of the browser's page:

Then select the new App ID on the right, such as:

In Description Enter a description of your app, Bundle identifier is the code ID of the app, for example, you can enter Com.company.demoapp. If you have a team ID, the ID is automatically added to the front of the identifier. Attention:

① because Apple has not yet provided the App ID deletion function, so description Best is also the only, otherwise the later use will be very troublesome.

② in Xcode 4.4.1, if you look at the project bundle Identifier, you will find that the DemoApp part corresponding to the front is not modified, so in the input bundle Identifier can be given in Xcode, This saves a lot of trouble that you don't know.

③ recommends requesting an ID with the last field "*", which allows you to submit a set of applications with the same ID, without having to request a separate ID for each application.

10, add the device. If you want the exported IPA to be installed only on the specified device, add these devices to the devices on the left side of the. To get the iOS device identifier (not the serial number), you can connect the device to itunes, select the device, and the serial number will appear first:

The identifier is displayed when you click the serial number:

11. Go back to the browser page, click Device on the left, and then select Add Devices:

Add a device to the open page. Don't forget the submit.

12, now can make profile. In the browser's page, click provisioning--distribution:

Then select New profile:

On this page, enter the profile Name and select the app ID. The distribution method in front has two options: the App Store and ad Hoc, the former indicates that you want to publish the program to the store, with such profiles exported by the IPA all devices can be installed, the latter indicates that only the application is allowed to install on the specified device, select the ad After the hoc, you need to select the authorized device below, which you specified before.

In order to distinguish the profile, I entered the profile name plus the suffix, _app_store and _ad_hoc, so it is more intuitive.

13, the newly created profile submitted up, wait a moment, refresh the page, you can download the profile, download success, double-click Automatically added to Xcode (my Xcode has been running).

14, configure the application. Run the already written project with Xcode and set its bundle Identifier:

Then, select the profile used for the signature, for example, find the code Signing and find the release:

In the Blue Line, click on the column corresponding to the project name, select the profile file, here is the type of ad hoc:

15. In the upper left corner of Xcode, select iOS device, then locate product--archive in the menu bar, and if all goes well, the build Success is displayed:

Then it will automatically open Xcode's organizer archives, and you can rename them:

16. Select the archive that you just generated, click the "Distribute ..." button on the right:

Select ad Hoc on the page that opens:

Click Next to select the code Signing Identity in the next step, and the candidate is corresponding to ad hoc:

Then proceed to next, set the name and save location, and then continue to generate the IPA file.

17. Install the generated IPA into the device using itunes. To test this IPA file, you can try a few more devices.

Problems:

CodeSign error:certificate Identity XXX appears more than once in the keychain. The Codesign tool requires there only is one.

This problem is very annoying, the problem is in the keychain access to this program, run the program, the duplicate certificate identity deleted may not work, because it is said that the deletion of Mac is not necessarily deleted, but must be invisible. I toss last night for one hours, the above packaging process repeated several times did not work, and then restarted the computer, incredibly done.

App Certificate and IPA package

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.