Programming/Non programming

Saturday, November 7, 2009

iPhone:Preparing Devices for Development

Preparing Devices for Development

Building your application for an iPhone OS–based device provides the most realistic environment
for you to test its operation and efficiency. Xcode makes building the application, transferring it to
the device, and launching it a simple affair.

The following sections describe how to build and run your application for iPhone OS–based devices and how to manage them in the Organizer.
In order to test your application on a device, you must configure your computer and your device for iPhone OS development. This process comprises the following tasks:

■ Become an iPhone Developer Program member

■ Obtain a developer certificate

■ Designate your device for development

■ Obtain and install a provisioning profile

Becoming an iPhone Developer Program Member

In order to become an iPhone Developer Program member, visit the iPhone Dev Center.
http://developer.apple.com/iphone/index.action

Obtaining a Developer Certificate

A developer certificate is a certificate Xcode uses to code sign your application before it uploads it to your device for testing.

To get a developer certificate:

1. Launch Keychain Access, located in /Applications/Utilities.
2. Choose KeychainAccess > Certificate Assistant > Request a Certificate From a Certificate Authority.
3. In the Certificate Information window:
a. In the User Email Address field, enter your email address.
b. In the Common Name field, enter your name.
c. In the “Request is” group, select the “Saved to disk” option.
d. Click Continue.
The Certificate Assistant saves a certificate signature request (CSR) file to your Desktop.
4. Upload your CSR file to the iPhone Dev Center.
5. Download your developer certificate and the Apple Root and AppleWWDRcertificates from the
iPhone Dev Center.
6. Double-click each certificate to install them on your computer.

Designating a Device for Development

To designate a device for development:

1. Launch Xcode.

2. Plug the device into your computer.

3.In the New Device Detected dialog, click Use for Development.


Obtaining and Installing a Provisioning Profile

To be able to use a device to test your application, you need a provisioning profile. A provisioning
profile identifies a device as one that’s used for development and specifies the actions you can perform
on that device, such as whether you can make calls.
Download your provisioning profile from the iPhone Dev Center. After that, place it in the
~/Library/MobileDevice/Provisions directory:
1. In the Finder, go to your home directory and navigate to Library/MobileDevice.

2. Choose File > New Folder.

3. Name the new folder “Provisions”.

4. Drag your provisioning-profile file to the newly created Provisions directory.
You must quit and relaunch Xcode in order for it to load your provisioning profile, which appears
in Organizer > Summary > Provisions.

Building Your Application for a Device

To build your application for a device:

1. Select the device SDK from the Project > Set Active SDK menu or the Overview toolbar item.

2. Choose Build > Build (or Build > Build and Run).
The status bar in the project window indicates whether the build was successful or whether there
are build errors or warnings. You can view build errors and warnings in the text editor or the project window.
iPhones and iPod touches support two instruction sets, ARM and Thumb. Xcode uses Thumb
instructions by default because using Thumb typically reduces code size by about 35 percent relative
to ARM. Applications that have extensive floating point code might perform better if they use ARM
instructions rather than Thumb. You can turn off Thumb for your application by turning off the
Compile for Thumb build setting.

Running Your Application on a Device

To run the application you built in choose Run
> Run. If you have more than one devices attached to your computer, you can choose the device onto
which Xcode puts the built application using the Project > Set Active Executable menu.
Once running, you can test that your application performs as you intend using all the capabilities of
your device.


Thank you !!!

M.P.PRABAKAR
Senior Systems Analyst.

Want to relax and fun !!! Play the excellent game "ArrangeMe" on iPhone for free'
http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=335163596&mt=8