Getting Started with iOS Development
Manual     Reference     Scripting   
Unity Manual > Getting Started with iOS Development

Getting Started with iOS Development

Developing for the iOS

Building games for devices like the iPhone/iPad requires a different approach than targeting the home PC market. Unlike the PC market, your target hardware is standardized and not as fast or powerful as a computer with a dedicated video card. Because of this, you will have to approach developing your games for these platforms a little differently. Additionally, the feature set in Unity iOS also differs from that of Unity for desktop PCs.

Setting Up Your Apple Developer Account

Before you can run Unity iOS games on the actual device, you will need to have your Apple Developer account approved and set up. This includes setting up your team, adding your devices, and finalizing your provisioning profiles. All this setup is performed through Apple's developer website. Since this is a complex process, we have provided a basic outline of what tasks must be completed before you can run code on your iOS devices. However, the best thing to do is follow the instructions step-by-step from Apple's iPhone Developer portal.

Note: We recommended that you set up your Apple Developer account before proceeding because an Apple Developer account is required in order to use Unity iOS to its full potential.

Access iOS Unique Functionality

Unity iOS provides a number of new scripting APIs to access multi-touch screen, accelerometer, device geographical location and much more. You can find out more about new scripting classes on iOS scripting page.

Exposing Native C, C++ or Objective-C Code to Scripts

Unity iOS allows you to call custom native functions written in C, C++ or Objective-C directly from C# scripts. To find out how to bind native functions, visit the plugins page.

Prepare Your Application for In-App Purchases

Unity iOS runtime allows you to download new content, and you can use this feature to implement in-app purchases. To find out how to make your content downloadable, visit the downloadable content page.

Occlusion Culling

Unity iOS Advanced includes support for occlusion culling, which is perfect for squeezing high performance out of complex scenes with many objects. To learn how occlusion culling works, visit the occlusion culling page.

Splash Screen Customization

If you want to customize the splash screen that appears when launching your game on the device, you should visit splash screen customization page.

Troubleshooting

If your game crashes on a device, please consult the how to troubleshoot on iOS page for a list of common issues and solutions.

Reporting Crash Bugs on iOS

We welcome valid bug reports, but please look through the troubleshooting on iOS page first.

How Unity iOS Differs from Desktop Unity

Strongly Typed JavaScript

Dynamic typing in JavaScript is always turned off in Unity iOS. This is the same as adding #pragma strict to your scripts, but it is done by default instead. This greatly improves performance (which is especially important on the iPhone/iPad devices). When you launch an existing Unity Project, you will receive compiler errors if you are using dynamic typing. You can easily fix them by either using static typing for the variables that are causing errors or taking advantage of type interface.

Terrain Engine

The terrain engine is not supported on iPhone/iPad devices yet. The terrain engine is built to work with modern PC GPUs and does not sensibly scale down to iOS. Using custom low poly meshes and occlusion culling is the best way to create terrains on iOS devices.

Tree Creator

The tree creator is not supported on iPhone/iPad devices. The tree creator is built to work with modern PC GPUs and does not sensibly scale down to iOS. Using custom hand-made low poly meshes is the best way to create vegetation on iOS devices.

MP3 Instead of Ogg Vorbis Audio Compression

For performance reasons, MP3 compression is favored on iPhone/iPad devices. If your project contains audio files with Ogg Vorbis compression, they will be re-compressed to MP3 while building for iOS. Consult the audio clip documentation for more information on usage of compressed audio for the iPhone.

PVRTC Instead of DXT Texture Compression

Unity iOS does not support DXT textures. Instead, PVRTC texture compression is natively supported by iPhone/iPad devices. Consult the texture import settings documentation to learn more about iOS texture formats.

Movie Playback

Movie Textures are not supported on the iPhone/iPad. Instead, a full-screen streaming playback is provided via scripting functions. To learn about supported file formats and scripting API, consult the movie page.

Further Reading

Page last updated: 2010-09-24