# Structure of a Unity Xcode Objective-C project type

> Understand the structure of a Unity Xcode Objective-C project type.

When you build a Unity Xcode Objective-C project for the iOS platform, Unity creates a folder that contains an Xcode project. You need to build and sign this project before you deploy it on a device or distribute it on the App Store.

> **Note:**
>
> Use the [Xcode project type](/engine/6000.7/manual/platform-specific/iphone/getting-started/class-player-settings-ios.md#xcode-project-type) Player setting to build an Objective-C or Swift Xcode project type. For information on the structure of a Unity Xcode project built with Swift, refer to [Structure of a Unity Xcode Swift project type](/engine/6000.7/manual/platform-specific/iphone/ios-developing/ios-swift-xcode-project-type/ios-structure-of-swift-xcode-project.md).

Every generated Unity iOS Xcode project has the following structure and targets:


**Unity iOS Xcode project structure:**
![](/api/media?file=/engine/6000.7/media/images/Unity-iPhone-Project-Folder.png)

> **Note:**
>
> This image is for reference purposes only. Your project structure might look different than this example image depending on the version of Xcode you're using.

The Xcode project includes both the `.xcodeproj` project file and framework links that only appear in the Xcode project navigator. Apart from the default folders, you can create custom folders to add custom files as required.

> **Note:**
>
> You can modify a generated Xcode project using [Xcode.PBXProject](/engine/6000.7/script-reference/unityeditor/ios/xcode/pbxproject.md).

## Project targets

* **Unity-iPhone**: A thin launcher part that runs the **UnityFramework**. It includes the `MainApp` folder and app representation data such as Launch Screens, `.xib` files, icons, data, and `Info.plist` files. The **Unity-iPhone** target has a single dependency on the **UnityFramework** target.

* **UnityFramework**: The target that produces the `UnityFramework.framework` bundle. It includes the Unity runtime, `Classes`, `UnityFramework`, and `Libraries` folders, along with dependent frameworks. `UnityFramework` folder includes privacy manifest file (PrivacyInfo.xcprivacy), a consolidated privacy manifest file for Unity runtime, Unity **plug-ins**, packages, and your project.

* **GameAssembly**: A container for your C# code translated as C++ code. To build it, Xcode uses the IL2CPP tool that Unity includes in every generated Xcode project. The build produces:

  * `libGameAssembly.a`: A static library that contains all the project’s managed code, cross-compiled to C++, and built for iOS.
  * `il2cpp.a`: A static library that contains the [IL2CPP](/engine/6000.7/manual/scripting/compilation-and-code-reload/script-compilation/backends/il2cpp.md) runtime code to support your managed code.

> **Note:**
>
> Use [PBXProject.GetUnityFrameworkTargetGuid()](/engine/6000.7/script-reference/unityeditor/ios/xcode/pbxproject/getunityframeworktargetguid.md) to get the globally unique identifier (GUID) for the UnityFramework target and [PBXProject.GetUnityMainTargetGuid()](/engine/6000.7/script-reference/unityeditor/ios/xcode/pbxproject/getunitymaintargetguid.md) to get the **Unity-iPhone** target GUID.

## Classes folder

The `Classes` folder contains code that integrates the Unity runtime and Objective-C. Unity stores the entry points of the application in the `main.mm` and `UnityAppController.mm/h` files inside this folder. You can create your own `AppDelegate` derived from `UnityAppController`, or, if any of your plug-ins include `AppController.h`, you can include `UnityAppController.h` instead. If your `Plugins/iOS` folder includes `AppController.mm/h`, you can merge and rename them.

The code in this folder doesn’t change often, and you can place custom classes here. If you select the [Append mode](/engine/6000.7/manual/platform-specific/iphone/ios-building-and-delivering/build-process.md#replace-and-append-mode), Xcode preserves changes to this folder between builds. However, this function doesn’t support multiple build targets and requires a fixed structure of the `Libraries` folder.

Unity’s internal profiler is fast and unobtrusive, and feeds basic information about:

* Which subsystem is taking most of the frame time.
* The .NET heap size.
* Garbage collection (GC) event count and duration.

## Data folder

This folder contains your application’s serialized assets and .NET assemblies (`.dat` files). The `machine.config` file sets up various .NET services such as security and WebRequest. Xcode refreshes the contents of this folder with every build. You shouldn’t make any changes to it.

By default, the `Data` folder’s **Target Membership** is the **Unity-iPhone** target, and Unity runtime searches for it in the `mainBundle`. To change the default bundle where Unity runtime looks for the `Data` folder, call `setDataBundleId: "com.my.product"` on the UnityFramework instance before you call one of the run functions. For example, if you want to have `Data` together with the UnityFramework call, use `setDataBundleId: "com.unity3d.framework"` and set the **Target Membership** to **UnityFramework**.

> **Note:**
>
> On-Demand Resources are supported only when the `Data` folder is a part of the Application target and not a part of the `UnityFramework` target.


**Data folder with the Target Membership set to UnityFramework.:**
![](/api/media?file=/engine/6000.7/media/images/Xcode-Data-Folder.png)

> **Note:**
>
> This image is for reference purposes only. Your project structure might look different than this example image depending on the version of Xcode you're using.

## Frameworks folder

The **Frameworks** folder contains `UnityRuntime.framework`, which contains the Unity Runtime static frameworks and plug-in types library for device and simulator.

## Libraries folder

The contents of the **Libraries** folder are refreshed with every build. You shouldn’t make any changes to it.

## Graphics files

Icons and splash screens (`.png` files) are located in asset catalogs in the `Unity-iPhone` folder. Unity automatically manages these files. Launch screens, their XML Interface Builders (`.xib` files), and Storyboard files are stored in the project’s root folder. You can configure these files in the Editor window (menu: **Edit** > Editor > **Player Settings**). Make sure the custom launch images that you create adhere to Apple’s [Human Interface Guidelines](https://developer.apple.com/ios/human-interface-guidelines/).

## Property list (.plist) file

You can manage the `Info.plist` file within the **Unity-iPhone** target (accessed via `mainBundle`) from Unity’s **Player Settings** window (menu: **Edit** > **Project Settings** > **Player Settings** > **Other Settings** > **Identification**). Unity updates this file rather than replacing it while building the Player. Don’t make changes to it unless you need to.

The `/UnityFramework/Info.plist` file, accessed via `bundleWithIdentifier:@"com.unity3d.framework"`, is a part of `UnityFramework`. You can keep project specific values in this file instead of the `Info.plist` file of the `mainBundle`. This makes sure that you can still get these values if `UnityFramework` is moved into another application, for example, when using [Unity as a Library](/engine/6000.7/manual/platform-specific/iphone/ios-developing/unityasa-library-ios.md).

> **Note:**
>
> You can also manage the `Info.plist` file using the PlistDocument API. For more information, refer to [PlistDocument](/engine/6000.7/script-reference/unityeditor/ios/xcode/plistdocument.md).

## Additional resources

* [Unity Profiler](/engine/6000.7/manual/analysis/profiler.md)
* [iOS Player settings](/engine/6000.7/manual/platform-specific/iphone/getting-started/class-player-settings-ios.md#Identification)
