IPhone development BASICS (10) --- running programs on devices

Source: Internet
Author: User

Register iPhone Developer Program

To run your own Program on the device, register it on the iPhone Developer Program. First, log on to the iPhone Dev Center.

 

IPhone Dev Center

Click "Apply now" in "iPhone Developer Program" on the right to enter the registration screen. Click "Learn More"> "ApplyNow" on the subsequent page and log on.

 

Registration page

After logging on, choose "Individual", "Company/Organization", and confirm the amount and contract. After the registration process is completed, you will be notified via email in the next few days, as required.

Before registering, you can download the latest iPhone SDK and update the firmware version of the iPhone or iPod touch.

Prepare the Startup Program

After registering on the iPhone Developer Program, you can start our application in the following order.

Connect to Xcode

Connect the iPhone or iPod touch device to Xcode. Normally, you often use iTunes to connect to the device. This time, Xcode is used. Open "window"> "organizer" in the Xcode menu )」. The connection device information is displayed in "DEVICES", for example:

 

Organizer

In the information represented by organizer, the 40-bit Device ID represented by "Identifier" needs to be confirmed.

Generate proof

Click utility> Keychain access from the application 」.

 

Then click "Keychain access" → "Certificate assistant" → "issue certificate ...」.

 

Enter the address when registering the Apple ID in "user's email address" and enter the English Name in "Common Name. Finally, select "Save to hard disk" and "specify symmetric key intelligence" and click "Next 」.

 

Select the file storage location.

 

In symmetric key intelligence, check that the key size is "2048 bits", the algorithm is "RSA", and click "Next 」.

 

After a while, an ending screen will appear. The saved file can be used to request a certificate.

Create and download configuration files

Click "Program Portal" on the right of the iPhone Dev Center 」.

 

You can use the Program Portal to set applications on iPhone or iPod touch devices. A simple wizard is provided for ease of use.

Registration Certificate

For example, click "Certificates" on the left to register the certificate you just prepared.

 

Click "Request Certificate", select a file for the Request Certificate from the image below, and click "Submit 」.

 

After submitting the workbook, add it to the table and click "Approve.

 

Then, the "Download" button is displayed in the table and you can click it to Download the certificate.

 

Do not forget to download "WWDR intermediate certificate" under the table 」. Double-click the two downloaded files and select OK in the "submit Certificate" dialog box. After that, you can confirm the added certificate in the "certificate" section of the Keychain.

 

Device Registration

Register the iPhone or iPod touch. Select Add Device in the upper-right corner of "Devices 」.

 

Enter any Device Name in Device Name. In Device ID, enter the value confirmed in Xcode.

 

Generate App ID

Next, click "App IDs" to generate an AppID.

 

Enter any Name in "App ID Name" and "*" in "App ID" on the right. Use the App ID to manage applications by different groups. If the "Bundle Identifier" you entered is inconsistent with the "Bundle Identifier" contained in the application, the program will not start. It is mainly used to facilitate the development of projects by multiple people and is not necessary for individuals. Therefore, the App ID is written as "*", which means that programs containing any Bundle Identifier can run.

Click Submit to complete the registration.

 

Create Provisioning Profile

Finally, create the Provisioning Profile. Select Provisioning and click Add Profile in the upper-right corner 」.

 

Enter any Name in Profile Name. Select "Certificates" "App ID" Devices "and click" Submit "to create a Provisioning Profile.

 

Wait for a while, and "Download" is displayed in the table. Click it to download the Provisioning Profile file.

Install Provisioning

Open the Xcode project of the application. Open "window"> "organizer" from the menu, and drag the created Provisioning file to the Provisioning project.

 

Project Settings

Next, use the installed Provisioning to set the application. Click "project"> "Project Settings" in the menu 」.

 

Click compile 」.

 

The "Code signature ID" in "Code Signing" is a combination of "Any iPhone OS Device" and "iPhone Developer. On the right, select the installed Provisioning, that is, "iPhone Developer: My Certificate Name 」.

Compilation and execution

After all the settings are complete, you can compile. You can choose whether it is executed by the Simulator or the Device is running on the world's devices.

 

After compilation, the application is automatically transferred to the device and started.

Author: Yi Feiyang

Related Article

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.