Step by step teach you to learn iOS real-computer debugging, common certificate problem solution and XCODE7 after the real machine debugging

Source: Internet
Author: User

can I talk dirty? Well, in order to show that we are scholars, or not ...
Recently really was this Xcode real machine debugging and certificate/configuration file problems to want to die heart all have, two days in a row encountered various problems, and then on all kinds of Baidu, all kinds of Google, even I do not need English for many years to take out in the StackOverflow questions, in order to get a real machine debugging, Baby Heart Bitter Ah, there is no pain to say AH
(PS: By the way, can turn over the wall as far as possible to turn over the wall with Google to check the problem, Baidu really really bad point, like the recent "Wei Zesi incident")

Okay, here's the official start of the real-machine debugging tutorial

I. iOS real-computer debugging detailed tutorial Tip:
    • You must use the Apple Developer Account (AppID) for real-machine commissioning and posting on the App Store, which costs $99/years
    • After the Xcode7 can be no real machine debugging, specific tutorials look down
    • The specific process for iOS real-computer debugging is as follows
Created with Rapha?l 2.1.0 Create a developer certificate (certificates) Device Registration (DEVICES/UDID) Create AppID (Identifiers) Create a configuration profile (Provisioning Profiles) Equipment Commissioning 1. Create a developer certificate

The developer certificate is required for iOS real-time debugging, and each developer is allowed to use only one developer certificate at once, and can be configured to sign in to Apple Developer (you'll need an Apple iOS developer account when you sign in to the site, not a friend to register a bar)

  • After we get to the Apple Developer website, slide the page to the bottom, click Certificates under Account, IDs & profiles go to the login page, enter your Apple iOS developer account and log in

  • Now that we have entered the certificate configuration portal, click All under Certificates to see all the certificates

  • Creating a certificate can be divided into two steps:
    (1) Generate a certificate request file
    (2) Submit the certificate request file to the configuration portal site

  • (1) Generate a certificate request file

    • In MacOSX OS Mac computer, turn on "applications" → "Utilities" → "Keychain access" into the Keychain Access tool, the interface is as follows

    • At this point we select the top menu bar "Keychain Access" → "Certificate Assistant" → "Request a Certificate from a Certificate authority ..."
      Open the "Certificate Assistant (Certificate Assistant)" interface, and fill in "User Email Address" and "Common name", here I fill in my QQ mailbox and my common name. Then select "Request is:" Saved to Disk "and click on the" Continue "button

    • In the popup dialog box, select the file save name and path, where I save the default name on the desktop

  • (2) Submit the certificate request file to the configuration portal site

    • After the Certificatesigningrequest.certsigningrequest file is generated, go back to the Configuration portal site. Click on the top right corner to open the Certificate Type selection screen

    • After choosing a type based on your needs, here I choose iOS App development as a demo, and then always click the Continue button until you get to the file page that uploads the certificate signing request, such as:

    • Click Choosefile,
      and upload the previously created Certificatesigningrequest.certsigningrequest file, and then click Continue to generate the certificate, the following interface is generated
    • The certificate is valid for May 08,2017. At this point, we can click on download under the certificate for testing or publishing. Click Done to return to the Certificate Configuration home page, Click Development on the left-hand column certificates to see the certificate we created. The first one is the certificate that was previously created and is valid for May 08,2017.
2. Device Registration

To control the illegal use of iOS, Apple requires registration for a debugged iOS device. That is, if your iphone has not been registered, it cannot be used for real-computer debugging.
The registration process also needs to be done in the configuration center, as follows.

    • Before registering your device, you need to get the udid of your iOS device first
      • After you connect your iOS device to your Mac computer with a data cable, turn on itunes on your computer, and we'll find the phone icon in the diagram and click on it, and you'll usually see the interface like this
      • When we click Serial number, we find that the item is serial number->udid->ecid->product The type loops through the device information. We just need to switch to Udid and right-click Copy to get the iOS device's udid.
    • Then go to the Configuration page and click on the Devices navigation menu on the left.
    • Click, the following screen will open
    • In the case of a single iOS device, we can fill in the name and Udid directly in the register device. If you are registering for a batch device, you can use the Register multiple Devices upload a fixed-format device list file to complete. You can download the template provided by Apple by clicking on the blue Download sample files.
      • Here I will add a single device in the first way to demonstrate. Name to fill in the iOS device names, this casually take, you know on the line, Udid add the first step to get the Udid. Click Continue to go to the following page
      • Where name is the name information we just filled out, model is your iOS device model that is recognized by your udid, Udid is the Udid information you fill out. We click Register to complete the registration. and return to the registration page, you will see the device we just registered
3. Create AppID
    • After the device registration is successful, you also need to create an app ID for your app.

    • Click on the Identifiers app IDs on the left and click on the top right corner to go to the following page

      Here we create with Universal appids,

      • Name, fill in the iOS Universal development App ID,
      • App ID suffix select wildcard app id,bundle ID fill in com.iosdev.* (here to fill in * to indicate universal AppID for all applications)
      • AppServices We can choose the services we need to include, here we are in the default way,
    • Click Continue to continue, click Register on the page that appears, then click Done on the page that appears, and this time our AppID is created.
4. Create a configuration profile

The configuration profile (Provisioning Profiles) is used when the application is compiled on the device and is divided into

    • Development configuration Profile: for developing (debugging) apps
    • Publish Configuration Profile: for publishing apps

The steps to create a configuration profile are as follows

    • Click on the left menu provisioning all under Profiles

    • We click on the top right corner to enter the configuration profile creation interface, such as.
      Here we take the Create development configuration profile As an example, click Development under the iOS APP development, and click Continue continue

    • Select the iOS Universal development App ID created in the 3rd step in AppID, and click Continue continue
    • Select the certificate created in 1 and click Continue to continue
    • In the Select Device interface Select the device registered in the 2nd step, we can also directly select all, and click Continue to continue
    • Enter iOS development in Profile name and click Continue to continue

    • This time our configuration profile and the creation succeeded, we can click Download to save its download to local.

5. Equipment Commissioning
    • After all the preparation is done, we can then debug the device and double-click on the configuration profile you downloaded earlier. You can import the file into Xcode.
    • In the project, select the project name under Targets,->build settings->code signing->code Signing Identity Item,

      • Select the previously created certificate under Debug and release.
      • Provisioning Profile Select the configuration profile that was created before iOS development.
      • Choose our iOS device in scheme

      Once the compilation is successful, we can run the program on our iOS device and debug it.

Two. Real machine debugging frequently encountered problems and solutions.

Pending update ...

Three. Xcode7-free real-machine debugging

Pending update ...

Step by step teach you to learn iOS real-computer debugging, common certificate problem solution and XCODE7 after the real machine debugging

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.