iOS real-machine debugging for Xcode 5

Source: Internet
Author: User

because XCODE5 the arrival of the iOS software for the real-time debugging, there are some changes, Apple in Xcode 5 modified some rules, on the one hand, to prevent the previous crack in the way of debugging (certificate-free). On the other hand, the feature that automatically generates certificates is added to speed up Our developers generate some debug certificates. We don't have to go to the Apple developer site to generate them.
Let's take a look at how to do this in XCODE5. for real-machine debugging.

first, the real machine debugging required material Description

before you apply for a real Machine debug certificate, the files required to debug Apple's real machine are described:

Apple Real machine debugging needs certificate (Certificates) and description file (provisoning Profiles)

1. The certificate (certificates) is uploaded to the developer after it is generated by the Apple's own keychain and then generated to complete

2. The description file (provisoning Profiles) needs to select the App ID( including bundles, which must be consistent with the bundle of your program) when generating the profile. In order to be able to debug multiple programs at the same time, the general bundle fill in the end with the * number instead, the text will be specified after the selection certificate (certificates) and equipment (Devices) three things

So if you want the real machine to debug successfully, you must have the App ID, certificate (certificates), profile (provisoning Profiles), the device (Devices), and the Bundle Identifier you want to debug the program to remain consistent


Second, enter the application interface

Open iOS Dev Center, choose Sign In, login (at least $99 account), login to the right of the page to find IOS Developer program, select Certificates, Identifiers & Profiles, select Identifiers

For Xcode 5 ">

third, add app ID

Select Identifiers->app IDs, select the Add button on the right to add

For Xcode 5 ">

The
app ID consists of two parts separated by the. Symbol, by default, the app ID is prefixed to your team ID, the suffix is defined as a search string for the bundle ID, and each part of AppID has a different and important use for your application

1. App ID Description: This part is just a code of your ID, just fill in a name you can distinguish, in the later application certificate and description file will be related to the selection

for Xcode 5 ">

2, App ID Prefix: This part is Team ID, system default, no need to fill in

3, App ID Suffix: This part is app ID suffix, can choose Explicit app ID or wildcard app ID

3.1. Explicit App ID

Explicit App ID: If you plan to add the app to game Center, or use in-app purchases in your app, do data protection, use icloud, or want to give your app a unique profile, you'll have to apply for the Explicit app Id.
        to create the explicit App ID, enter a unique string in the box below, which the string must be associated with your app The bundle ID of the program matches, Apple recommends using com. Name of your company. App Name as your bun. dle ID, if it is selected in explicit App id,bundle ID cannot contain an * number

For Xcode 5 ">

3.2, Wildcard App ID: Universal App ID, just use com.oschina.* format to match multiple applications, this article takes the general type as an example

Wildcard App ID: Allows you to use an app ID to match multiple apps, want to create a generic app ID, use the * number at the end of the input bundle ID
            ForXcode5 ">

4. App Services: service provided by the application

App Services: Select the services you will use in your app and edit your selection again after the app ID is registered successfully
     on the options used in your own application to play √, because I choose a universal type (WildCard), so the game Center,in-app Purchase, Push notifications are not optional, if you want to use these features, select the exact type (Explicit)

For Xcode 5 ">

After completing the above, select Continue

5. Confirmation of information

For Xcode 5 ">

After confirmation, select Submit, the Word registration complete will appear, select Done.

Iv. Adding equipment (Devices)

1, connect the device to the computer, open in the organizer->devices of Xcode

XCODE5 below organizer in the top right corner of the software can be found, XCODE5 Organizer Select window->organizer (shortcut key shift+command+2)

After the device is connected to Xcode, the lights in the devices are gray, yellow, and green. Three kinds of cases

1.1. Grey Lamp

If the device is not previously used as a development machine, the light on the device in the devices should be gray, there is an option on the right to use the device as the development machine, click it, because there is no new machine, unable to demonstrate

1.2, yellow light, there are two cases

For Xcode 5 ">

    • The device is not connected, please plug the cable back in again, and check if the interface is plugged in, or if it is a yellow light, it is not the next situation.
    • The device version is higher than the version that Xcode can support, such as XCode4.6.3, the highest supported version is not iOS6.1, if your device is not iOS7 and above, you need to update to XCODE5

1.3. Green light: Indicates the connection is successful and can be debugged.

2, look at the udid,8,identifier of the device followed by a string of letters plus a combination of numbers that is Udid

For Xcode 5 ">

3. Go back to the Apple Developer Center and select the Add button on the right side of the devices to add the app ID

For Xcode 5 ">

The following can also choose to add more than one device, I said IQ is not enough, will not, $99 account can add 100 devices, $299 of the account I do not know.

v. Add a certificate (certificates)

1. Select Add certificate, follow Figure 10 to select Continue

For Xcode 5 ">

2. Show you how to apply for the certificate interface

2.1. Turn on the keychain in your computer: Select launchpad-> Other keychain access

For Xcode 5 ">

2.2. Select Keychain Access, Certificate Assistant, request a certificate from a certification authority

For Xcode 5 ">

2.3, fill in the email address and name, click Continue storage, generally stored on the desktop (according to personal preferences)

For Xcode 5 ">

2.4, back to developer interface, select continue, appear upload certificate interface

2.5. Select Choose File to upload the certificate you just stored, and then select Generate.

For Xcode 5 ">

2.6, after the generation will appear can download certificate, select download , double-click Install can

Vi. Adding a description file (Provisioning Profiles)

1. Select Provisioning Profiles->development, then select Add button on right side

2, select Type, choose iOS App development, select Continue

3, select the app ID, select the com.oschina.* I previously added, select Continue

For Xcode 5 ">

4. Select the certificate, select the development certificate that you just generated, and select Continue

5, select equipment, will appear equipment list, generally put all the equipment is added to facilitate the commissioning of multiple units, no need to apply for profile, select Continue

6, for this profile name, can not contain punctuation, choose generate

For Xcode 5 ">

7, select the download, double-click the installation can

Vii. Configuring Xcode

1, open Xcode, plug in the device, if Xcode does not display the device, but the status of IOS device, then check Targets->ios application target->deployment Whether the version in target does not match the device version

For Xcode 5 ">

2. Select the build Settings, set the profile in code signing to the Provisoningprofile (joanfen) downloaded above, or set it to the iphone in automatic profile Developer,xcode will automatically match the description file

For Xcode 5 ">

3. Check if the bundle ID matches the bundle in the app ID contained in the description file, select Targets->summary view, as we are applying for the Universal app ID, the bundle Identifier only need to be com.oschina. The beginning, you can fill in the back

For Xcode 5 ">

Eight, choose the real machine equipment, run, done.


iOS real-machine debugging for Xcode 5

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.