Manage Your Devices

You manage iOS devices in Xcode using the Devices pane of the Organizer window (Figure 10-1).

Figure 10-1  Devices organizer

Although you can do much of your debugging and testing of an iOS application using iOS Simulator, simulation cannot completely match the results of running your application on the target devices; you must test your application on actual devices to ensure that it runs as intended and to tune it for performance on actual hardware.

Set Up Your Device

To use a device with Xcode, you must provide the device with a provisioning profile and install iOS on the device.

Provision a Device

If you are a team administrator, or if your team administrator has already configured the necessary credentials for you and your device, you can use the devices organizer to automatically download and apply the provisioning profile.

Provision your iOS device to run generic apps on your device, such as sample apps.

Some types of applications require manual provisioning. In such cases, your team administrator must first configure the necessary credentials for you, using the iOS Provisioning Portal. Follow your administrator’s instructions to download the appropriate provisioning profile, and then use the devices organizer to locate the provisioning profile on your file system and apply it.

Provision your device manually when you develop an app that requires a specialized provisioning profile.

Restore or Install a Version of iOS on a Device

You should test your iOS application on devices running the version of iOS version targeted by the SDK you’re using. The devices organizer enables you to restore a currently installed version of iOS or to install a new version.

Install a new version of iOS when you want to upgrade a device for development.

Run Your Application On a Device

Set the run destination to iOS device in the scheme editor and build and run your application. Xcode transfers the application to the device and executes it.

Remove an Application from a Device

Successful development and testing frequently depend on starting with a clean execution environment. To achieve this state, you can completely remove your application from a device.

Delete an app from your device to remove all data files associated with the app.

Download Your Application’s Data for Analysis

You probably have favorite tools that you use in inspecting application-generated data. To use such tools, you need to copy that data to your computer intact. To do so, you download the data from the devices organizer, specifying a location for the data on your local file system.

Copy an app’s data from its sandbox on an iOS device to your file system to examine or modify the data.

Capture and Use Screenshots from a Device

Screenshots are important in several aspects of development and distribution—for example, serving as illustrations in documentation and as graphics for the App Store and other marketing needs.

In the organizer you can capture and manipulate screenshots of your application running on the device.

Capture a screenshot on your device to document your progress during development, and create launch images for your iOS apps.

Set a Screenshot as Your iOS Application’s Launch Image

An application launch image, or default image, enhances the user’s experience at application launch. When the user starts your application, iOS immediately displays this image. Your application then displays its first screen as soon as possible, replacing the launch image.

Set the launch image of your app to give the user immediate feedback that the app launched.

To help avoid a jarring experience when this switch occurs, the ideal default image looks identical to the first screen your application displays, except that it should omit any UI elements that could change.

Export a Screenshot to Your File System

To use a screenshot outside your application, for example, in documentation or marketing materials, you can export it from within the devices organizer.

Save a screenshot to your file system to archive it or use it for materials related to your app.

With the screenshot file on your computer file system, you can modify it with any graphics editing application that accepts PNG files.

Identify Small UI Changes by Comparing Screenshots

As development progresses, small changes you have made to your UI may be unrecorded and remain unnoticed until late in the development cycle. To help mitigate this problem, you can compare different versions of a screenshot to determine exactly what has changed.

Compare screenshots to detect subtle changes to your user interface.

Transfer Your Developer Profile to Another Computer

Your developer profile is your official digital identification for iOS application development. If your development workflow requires you to use another user account or another computer, you must copy that profile to that other account or computer.

To do so, you first export your profile, which archives the profile into a password-protected secure file in a location that you specify on your operating system. This export is performed in the devices organizer.

Archive your code signing assets to keep them safe or to use them on another Mac.

Next, you copy the archive file to the other account or computer.

Finally, in the other account or on the other computer, you use the devices organizer to import your profile by extracting it from the archive file.

Place your code signing assets on a new Mac by importing the code signing assets exported from another Mac.

Finally, in the other account or on the other computer, you use the devices organizer to import your profile by extracting it from the archive file.


Did this document help you? Yes It's good, but... Not helpful...