Building ARDK Apps for iOS

Use the following steps to build and deploy your ARDK app to iOS devices.

Prerequisites

You should have a Unity project configured with the ARDK package, as described in Adding ARDK to Unity.

Your Unity project should have an Authentication asset configured with your API key, as described in Authentication.

You should have an iOS device compatible with ARDK. See “Runtime Requirements” in System Requirements for a list of compatible iOS devices and minimum iOS versions.

Steps

  1. Access the Build Settings (menu: File> Build Settings). Click the Player Settings button.

../../_images/BuildMenu1.png

Change the Company Name to your organization’s name. Then navigate to the iOS > Other Settings pane to specify your build settings.

../../_images/BuildSettings1.png

Setting

Value

Function

Multithreaded Rendering

Enable this option to use multithreaded rendering. Both enabling and disabling this option is supported by ARDK.

Camera Usage Description

Enter the reason for accessing the device camera.

Location Usage Description

Enter the reason for accessing the device location.

Target minimum iOS Version

11.0+

Select the minimum version of iOS that the app works on.

  1. Back in the Build Settings window, the Example/StarterScene should be automatically added and checked inside the Scenes In Build box. If it is not checked, find the scene in the Unity Project window and drag it into the box.

../../_images/Scenes1.png
  1. Click the Build and Run button. Save the build to your desired location and click Save. Xcode should open automatically after a short time.

../../_images/BuildAndRun1.png
  1. Navigate to the project’s Signing & Capabilities menu page. Select your Signing Team. You should also change the Bundle Identifier to your organization’s name.

../../_images/SigningAndBundle.png
  1. Everything should now be ready to build to the mobile device! Connect your iOS device to your computer and click the Run xcode_run_button button. The ARDK-Getting-Started App should open on the connected mobile device automatically.

  1. If XCode throws multiple build errors regarding missing frameworks/symbols while trying the above step, this is because we include a post-build script that automatically populates the iOS Info.plist with necessary frameworks, and that script occasionally fails. To fix, either rebuild from Unity, or:

Navigate to the Frameworks, Libraries, and Embedded Content section of the General menu page.

../../_images/Frameworks.png

Click the + button at the bottom to manually link the following frameworks:

  • ARKit

  • Vision

  • CoreML

  • CoreImage

  • MetalPerformanceShaders