Setting Up Your Device
Now that your development machine is setup, it’s time to setup your iPad for development. Here’s what needs to happen:
- You need to register your device ID.
- You need to create an App ID.
- You need to create a development provisioning profile.
- You need to download and install the development provisioning profile.
These steps can be performed one of two ways, by using the Xcode’s Organizer window or the iOS Provisioning Portal. Using Organizer is by far the easiest way to setup your iPad for development. It performs the steps automatically for you. This approach is, however, not without its limits.
Organizer creates a wildcard App ID, and as you may recall, a wildcard App ID cannot be used if you plan to use Apple services like Game Center, In App Purchase, and Push Notification. That said, you should still let Xcode do its magic. While you may not use a wildcard App ID for your next awesome iPad app, it can be used to build and run sample apps and to test proof of concepts and prototype applications on your iPad.
Use for Development
The steps to setup your iPad for development are quiet easy using Xcode. Tether your iPad to your development computer. Launch Xcode and open the Organizer window (Windows > Organizer or Shift-⌘-2). Organizer shows the list of registered and attached iOS devices. Attached devices have a status icon displayed to the right of the device name. A white status icon means the device is not ready for development. A green status icon means the device is ready for development. A yellow status icon means the device is busy.
Click the name of your iPad in the Devices list. You should see a screen similar to the one shown in Figure 6.9. Click the Use for Development button. Xcode will prompt you for your iOS Provisioning Portal credentials. Enter your Apple ID and password used for your iOS developer account.
Xcode automatically sets up your device for development. It registers your device with the iOS Provisioning Portal, creates a wildcard App ID and development provisioning profile, if needed, and lastly downloads and installs the provisioning profile.
Figure 9 (Click to Enlarge) Organizer window with a new Apple device attached to the computer.
The process can take a few minutes. While the process is running, the status icon is yellow. Do not disconnect your iPad from your computer while the process is running. Once the process is compete, the status icon changes to green and you will see a screen similar to the one in Figure 6.10.
Figure 10 (Click to Enlarge) Organizer window with an attached Apple device ready for development.
You are now ready to build and run iOS applications on your iPad. To test that everything has been setup correctly, create a new project in Xcode. You can select any iOS application template, it does not matter which one. Make sure you select your iPad as the device for the active scheme (seen in Figure 6.11). Build and run (⌘-R) the project. Assuming your development machine and iPad are setup correctly, you will see the sample app running on your iPad.
Figure 11 (Click to Enlarge) Using the quick list to set the Device as the Active SDK.
As you just learned, using Xcode is the easiest way to setup a new device. But what happens if there is a problem? And what if you plan to use Apple services, like iCloud, Game Center or In App Purchase, which requires an explicit App ID? You need to use the iOS Provisioning Portal to manually perform the steps.