xCode real machine debugging

iPhone program development, the first step should be to run your first HelloWorld program with a real machine. Unlike Android, the iPhone can be debugged on the phone with the debugging function turned on and connected with a USB cable. The iPhone needs the following A few steps:
1. First, you must have your own developer account; then enter your own ios dev center; Certificates, Identifiers & Profiles

2. In the development center, add a Certificate, that is, a developer certificate, which is divided into For both development (iOS Development) and release (iOS Distribution), this certificate is required for both real machine debugging and uploading to the App Store. It is a basic certificate to prove the identity of the developer; we generally create a developer first. Certificate;
    to generate a developer certificate, the steps are as follows:

    2.1 On the Mac computer, Finder-"Utilities"-"Keychain Access"-"Certificate Assistant"-"Request a certificate from a certificate authority", the certificate assistant's message will pop up. dialog box, fill in the developer account in the "User Email Address" column; don't fill in the rest, select Store to disk

    2.2 Save the certificate to the computer, in the ios dev center, when adding Certificates, you will be asked to upload the certificate; then If there is no more, then simply click Next to generate the certificate;

3. After the development certificate is created, we will generate the APP id next, during which we need to formulate the app id suffix, specify the services that the APP needs to use, etc.; confirm the submission That 's it

4. After generating the APP id, we also need to add the real ios device corresponding to debugging to the devices, the UDID corresponding to the name

5. The last and most critical step: generating Provisioning Profiles files
    This step will use the bundle id used in the actual project, that is, the APP id; select the certificate just generated; select the device just added; finally, customize the file name to generate the PP file we want; after the generation is complete, Click to download to the computer, double-click to install;

6. Next, execute the debugging function in xcode, and select the PP file that we will finally generate and download to the computer at the Generate Provisioning Profiles in the project configuration file; the real machine debugging function can be performed;

It was my first time trying to debug a program on a real machine, but everything went smoothly :)

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326464664&siteId=291194637