When you develop applications using the iPhone SDK, you should test those applications on devices running the iPhone OS version the SDK targets. You can download the latest release of the iPhone SDK from the iPhone Dev Center. Use iTunes to install the latest iPhone OS onto your device. iPhone Dev Center.
To restore a device:
1. Launch Xcode and open the Organizer window.
2. Plug the device into your computer.
3. Select the device in the Devices list.
4. From the Software Version pop-up menu, choose the version of iPhone OS you want to place on the device.
If you’re using a seed release of the iPhone SDK and the version of iPhone OS you want to install is not listed in the Software Version pop-up menu:
a. Download the iPhone OS seed that corresponds to your iPhone SDK seed from http://developer.apple.com.
You must be a member of the iPhone Developer Program to be able to download
iPhone OS.
b. From the Software Version pop-up menu, choose Other Version.
c. Navigate to the disk image containing the iPhone OS developer software and click Open. Xcode extracts the iPhone OS software from the disk image. You can dispose of the disk image you downloaded.
d. From the Software Version pop-up menu, choose the newly downloaded iPhone OS version.
During nonseed periods, you must install iPhone OS using iTunes.
5. Click Restore iPhone or Restore iPod, depending on your device’s type.
6. Use iTunes to name your device.