The Anatomy of an iPhone

From Techotopia
Jump to: navigation, search
PreviousTable of ContentsNext
About iPhone App Development EssentialsThe iPhone OS Architecture and Frameworks

Purchase the fully updated iOS 12 / Xcode 10 edition of this book in eBook format for only $24.99.
iOS 12 App Development Essentials eBook (ePub/PDF/Kindle) edition contains over 120 chapters. Learn more...

Buy Print Preview Book

Most books covering the development of apps for the iPhone tend to overlook the underlying hardware of the device and instead dive immediately into the software development environment. This is a shame because the iPhone is an incredible technical achievement that we are already starting to take for granted.

Take, for example, the iPhone 3GS. This is a sleek device that is 115.5mm long, 62.1mm wide and 12.3 mm deep and weighs a mere 135 grams. Now, compare the size of your laptop or desktop computer to your iPhone. Then take a look at the specification for your computer and see if it has built in GPRS, EDGE and 3G wireless support, a digital compass, GPS, an accelerometer, a proximity sensor, an ambient light sensor, Bluetooth capability, Wi-Fi, a multi-touch screen, a vibration generator and a 3.5 megapixel autofocus camera. The chances are your much larger and heavier computer has only a small subset of these features. Next, check the expected battery life of your laptop and see if will allow you to play music for 30 hours or video for 10 hours, or talk non-stop to a friend for 12 hours without needing a recharge. When you consider these capabilities you will hopefully begin to appreciate the engineering achievements behind the iPhone and other similar smartphone devices.

Now that we have set the scene, we can move on to discuss some of the hardware features built into the iPhone in a little more detail. Once again, we will do this within the context of the iPhone 3GS.

iPhone OS

Before we delve into the hardware of the iPhone we will start by talking about the operating system that sits on top of all the hardware. This operating system is called iPhone OS and is a variant of Apple’s Mac OS X operating system that has been adapted to run on the iPhone. It is built upon a “UNIX-like” foundation called Darwin and consists of the Mach kernel, core services and media layers and the Cocoa Touch interface.


The iPhone 3GS has a 3.5 inch display with a resolution of 320 x 480 pixels capable of displaying 163 pixels per inch (ppi). The underlying technology is a thin-film transistor (TFT) capacitive touch screen capable of displaying up to 16 million colors. The screen has a scratch and oil resistant surface and includes a proximity sensor that automatically turns off the screen when you put the phone to your ear (presumably to extend the battery life during a phone call and to avoid making user interface selections with the side of your face). The device also has ambient light detection that adjusts the screen brightness to ensure the optimal screen visibility in a variety of lighting conditions from bright sunlight to darkness.

Wireless Connectivity

The iPhone 3GS supports a wide range of connectivity options. When within range of a Wi-Fi network, the device can connect at either 802.11b (11 Megabits per second) or 802.11g (54 Megabits per second) speeds.

For making phone calls or transferring data when not connected to Wi-Fi, the device supports GSM/EDGE connectivity (otherwise known as 2G). For faster speeds, support is also provided for connectivity via technology referred to as High-Speed Downlink Packet Access (HSDPA). This is better known as 3G and provides data transfer speeds of up to 7.2 megabits per second. The iPhone 3GS also includes Bluetooth v2.1 support, though this functionality is limited to headset support.

Wired Connectivity

Given the wide array of wireless options it is not surprising that the iPhone has little need for wired connections. In fact the iPhone only has two. One is a standard 3.5 mm headset jack for the attachment of headphones or other audio devices. The second is a proprietary, 30-pin dock connector that, by default, is used to provide a USB v2.0 connection for synching with a computer system and battery charging. In practice, however, this connection also provides audio and TV output via specialty third party cables.


The iPhone 3GS comes in two editions, one with containing 16GB of memory and another with 32GB. The memory is in the form of a flash drive. Unlike some devices, the iPhone lacks the ability to supplement the installed memory by inserting additional flash memory cards.


The iPhone 3GS contains a 3.15 megapixel (2048x1536 pixels), autofocus camera that may also be used to record video at VGA resolution at a rate of 30 frames per second.


The latest generation of iPhone has an array of sensors that would make even the most die-hard 1960s science fiction fan jealous. These consist of a proximity sensor that detects when the front of the phone is covered or otherwise obscured, an accelerometer that uses the pull of gravity to detect when the device is moved or rotated and an ambient light sensor that detects current environmental light levels.

Location Detection

<google>IOSBOX</google> The iPhone contains a digital compass and GPS support with Assisted GPS (A-GPS) support. Essentially this enables the iPhone to detect the direction the device is facing and to identify the current location by detecting radio signals from GPS satellites. In the event that GPS signals are unavailable or too weak to establish the current coordinates, the iPhone can also gain an approximate location using cellular and Wi-Fi information.

Central Processing Unit (CPU)

The central processing unit (CPU) of the iPhone 3GS is an ARM Cortex A8 chip running at 600 MHz. This is a processor designed by a British company called ARM Holdings that specializes in designing chips and then licensing those designs to third parties who then manufacture them. This differs considerably from the approach taken by companies such as Intel who both design and manufacture their own chips.

The Cortex A8 chip is based on the ARMv7 processor architecture and was chosen by Apple for its combination of high performance and low power requirements. With the arrival of the iPad, however, Apple has started to use processors manufactured to its own designs, so it is possible that the iPhone 3GS will be the last model to use an ARM based CPU.

Graphics Processing Unit (GPU)

iPhone 3GS graphics are handled by an Imagination Technologies PowerVR SGX Graphics Processing Unit (GPU). This is also the same GPU that is built into the iPad and provides support for OpenGL ES 1.1/2.0 (a lightweight version of SGI’s OpenGL platform) and OpenVG 1.1 graphics drawing and manipulation and includes the Universal Scalable Shader Engine (USSE), all key requirements for graphics intensive games development.

The older iPhone 3G contains the PowerVR MBX GPU which only supports OpenGL ES 1.1 and OpenVG 1.0.

Speaker and Microphone

As with most other phones on the market, the iPhone includes both a built-in microphone and a speaker to enable the use of the device as a speakerphone. Both the speaker and microphone may be used by third party apps, though as to be expected with a device the size of an iPhone, the sound quality of the speaker is widely considered to be poor.


Though initially provided as a “silent ring” feature whereby the device vibrates to indicate an incoming call as an alternative to a ring tone (a feature common to most mobile phone devices), the vibration feature of the iPhone may also be used within applications to notify the user of a new event (such as a breaking news story) or to provide tactile feedback such as for an explosion in a game.


As we have seen in this chapter, the iPhone packs an impressive amount of technology into a very small amount of space. Perhaps the most exciting aspect of all this technology is that you can, almost without exception, access and utilize all this hardware within your own applications.

Purchase the fully updated iOS 12 / Xcode 10 edition of this book in eBook format for only $24.99.
iOS 12 App Development Essentials eBook (ePub/PDF/Kindle) edition contains over 120 chapters. Learn more...

Buy Print Preview Book

PreviousTable of ContentsNext
About iPhone App Development EssentialsThe iPhone OS Architecture and Frameworks