Setting Up iOS Devices to Use for Development and Testing

Một phần của tài liệu Game Development for iOS with Unity3D 2012 (Trang 59 - 62)

2. Getting Set Up for iOS Development 31

2.9 Setting Up iOS Devices to Use for Development and Testing

Apple restricts you in allowing installation of your apps only to devices registered through the iOS Provisioning Portal (on the Apple Developer Center), which means that you have to first find out your device IDs before you can proceed with any instal- lation.

Each device has a unique ID number, referred to as a universally unique identifier (UUID). For any devices you want to install to prior to uploading to the iTunes Store, you will need to get their UUIDs and enter them one by one into the Devices section of the Provisioning Portal (see Section 2.9.2).

2.9.1 Adding Devices to the Developer Center Automatically for Generic Development

If you are adding your own devices, it is possible to automate the process of registering the device and updating provisioning profiles right from within Xcode. Xcode can do a lot of the work automatically when it comes to getting set up for basic development.

By setting Xcode to use Automatic Device Provisioning, it will set up a generic devel- opment provisioning profile and add any plugged-in devices straight to the Developer Center.

Figure 2.4. Xcode Organizer window.

2.9. Setting Up iOS Devices to Use for Development and Testing 43

To add a device to your provisioning profiles without actually have to open the De- veloper Center, first open up Xcode and bring up the Organizer:

1. Click the menu Window–>Organizer.

2. Click the Devices icon at the top of the window.

3. In the Library section to the left of the window, select Provisioning Profiles.

4. At the bottom of the window is a checkbox for Automatic Device Provisioning.

Make sure that this is ticked (Figure 2.4).

5. Plug in the device you want to add to the computer via USB cable.

6. Click the Use For Development button, and the device should be added au- tomatically. If this is the first time you have done this, a profile named “Team Provisioning Profile” will be created, which can be used for development and testing on the devices.

Xcode will also copy the provisioning profile over to the device automatically. If this is your first time going through this process, the device you added is ready for you to build to and run your applications on, and the development provisioning profile is there to develop with.

2.9.2 Adding Devices to the Developer Center Outside of Xcode

Before you can register the device in the Developer Center, you are going to need to find its UUID code. There are two ways to do this. If you have access to the device and you are able to plug it into your development system, we can get to the UUID via Xcode:

1. Click the menu Window–>Organizer.

2. If the Device section is not already showing, click on the Devices button at the top of the window (shown underneath an icon that looks like an iPhone). Your device should be shown on the left of the Organizer window.

3. Click on your device from the list. The main part of the window should now show some useful information, such as the capacity of the device, the model, and its identifier. The long string of letters and numbers next to the word “iden- tifier” make up the UUID.

4. You can easily right click this and copy the UUID to the clipboard for pasting into an email or straight into the Apple Developer Center.

Since most of your testers won’t have Xcode installed, a second method uses iTunes to get to the UUID. Although this process is relatively straightforward, it can be confus- ing for new users and may cause some support time for you and your fellow developers.

Be patient with your testers and remember that they are usually working for free—look after them!

1. First, start iTunes and connect the device via USB cable.

2. On the left side of the iTunes window there is a list of connected devices. Click on the device to highlight it and show more information in the main part of the window.

3. Near the top of the window, notice the serial number. Click on the actual words

“serial number” and they should change to become the word “identifier.”

4. The long string of letters and numbers to the right of this make up the UUID.

5. At this point, it is not necessary to highlight it; you can just press CTRL + C (Windows) or CMD + C (Mac).

2.9.3 Adding the UUID to the Provisioning Portal

To add a device to the Developer Center, follow these steps:

1. Log in to the iOS Developer Center and click on the iOS Provisioning Portal.

2. Click on the Devices link on the left side of the page.

3. Click the Add Devices button and enter the UUID of the device you want to add.

4. The Devices page shows you all of those devices that are currently registered to your developer account. Apple places a restriction on the number of devices you can add to this list (most likely to prevent developers from bypassing the iTunes Store and giving away or selling apps). There is a yearly limit, which at the time of writing is at 100 devices.

Note that although there is a way to remove devices from your device list, remov- ing does not lower your total device allowance. Once a device is added, it counts as a device from your allowance and remains that way until the list is reset. For most us- ers, the restriction isn’t much of an issue. It may not sound like a lot, but the current limit of 100 is more than enough for most developers. To keep tabs on it all, this page provides a running total, telling you exactly how many devices you have left on your account.

Here’s a tip: as you consider a device name for the Add Devices section, make sure that this will be a name that will be easily identifiable in the future. My suggestion for a good naming convention is one that includes a company name or the name of the de- vice owner, followed by the device type (e.g., PsychicParrot Games iPad, PsychicParrot Games iPod, or Steve Murray iPad2). Once you have added devices to the Developer Center, before you build again, you will need to create new provisioning profiles that will include the new devices.

There are two other sections on the Devices section of the Provisioning Portal web- site, available through the tabs at the top of the window. The History section helps you to keep track of what has been added or removed and when it occurred. If you acciden- tally remove a device, you will find its ID here if you need to put it back. The How To section guides you step by step through the process of assigning devices for develop-

Một phần của tài liệu Game Development for iOS with Unity3D 2012 (Trang 59 - 62)

Tải bản đầy đủ (PDF)

(278 trang)