There are many different ways to test an iPhone app. This document explains mostly used two different ways to Dev/test an iPhone Application, Ad Hoc sharing and using the full source code.
The easiest way is Ad Hoc sharing.
Ad Hoc Sharing
Ad Hoc testing is done using an iPhone application file, i.e., file with extension “.ipa”. You need an iPhone and computer with iTunes to sync iPhone.
Below are the steps to install application on your iPhone:
- Share your iPhone’s Unique Identifier (UDID) with a developer, since the developer needs this to setup a provisioning profile to allow you to install the application on your iPhone. If you don’t know the UDID of your Phone, then scroll down at the end of the tip to see instructions to retrieve the UDID.
- Using the UDID developer will create an app and provisioning profile.
- Get the app and provisioning profile from the developer, if it is shared on the shared drive you should see files with extension “.mobileprovisioning” file and “.ipa”. If developer sends it as a .zip file in email, unzip it, go to unzipped folder; on Windows you will see _MACOSX and "Test_App" folder. Ignore the _MACOSX folder; go to "Test_App" folder, you should see files with extensions “.mobileprovisioning” and “.ipa” .
- Go to the iTunes with your iPhone connected.
- First drag and drop the provisioning file, i.e., file with extension “.mobileprovisioning” in your iTunes library.
- Then drag and drop your application file, i.e., file with extension “.ipa”. Now you should see your app in your library in iTunes on your PC.
- To install the app on your mobile, go to the Devices in iTunes and click on your iPhone.
- Find your app and make sure it is checked to be synced.
- Apply changes.
- Once it is synced, you should see your app on iPhone.
Using Full Source Code
- To test an application using this method, you need a Mac OS machine and source code to the app:
- Login to the Mac and get the code (e.g. download from CodeProject or GitHub)
- Sync/clone the code on local if downloading from a Git repository.
- Connect the iPhone to your computer.
- Open project file, i.e., the file with extension “.xcodeproj” file for your app using XCode.
- Select the app from the left pane.
- Click the app under Targets (from the pane beside left pane).
- Go to the “Build Settings” tab at the top of the right pane.
- We need to change the code signing identity to Developer certificate.
- To change the Code Signing identity, click anywhere on “Code Signing Identity” row in build settings tab.
- Select your developer certificate; when you select certificate for top identity, it should change certificate for all the sub items. Please make sure it has changed the identity for all the sub items
- Change XCode's scheme to build your app by selecting scheme button at top left.
- Select debug version and select device.
- Click on Run button to build and run the App . The App should be installed on your iPhone.
- When you receive updated version of your app, delete the app from your device.
- Go to Product->Clean to start with clean installation.
Instructions for Retrieving iPhone’s UDID
- Start iTunes and connect your iPhone.
- On the Summary page for your iPhone, click on the word “Serial Number:” text.
- The serial number should change to the word “Identifier”, followed by a long string of numbers and digits.
- Press CTRL+C (Windows) or Command/AppleKey + C (Mac) and the UDID will be copied to the clipboard. Alternately, you can go to Menu -> Edit -> Copy Identifier (UDID).