Publishing to Target Device
In this section, we finally look at the steps to publish your application to your target device Android or iOS.
Setting the Developer API Key
As mentioned in the previous section, every application must be registered at the Holoboard Developer Control Panel. Once an application is registered, copy the APPID for your application from the developer control panel.
Paste this APPID in the Developer API Key field of the ARCamera - Basic prefab in your scene(s) as shown below.
Setting up the Unity Player for Target Device
Go to File -> Build Settings to open the Build Settings dialog box.
Choose either Android or iOS based on your Target Platform and click on Switch Platform if not already on the destination platform as shown below.
Ensure your scene(s) are added to the Scenes to Build section.
- Click on Player Settings to configure the player settings for your Target platform.
Player Settings
Android
Ensure that your Target Android Device and the Development System is configured to build for Android.
- You may read the full article here for more information on this.
Configure the player settings as shown below for Android device -
Under Resolution and Presentation tab, Set the Default Orientation to Landscape Left.
Under Other Settings tab, Set the Minimum API Level to Android 6.0 or above.
Under the Other Settings tab, Set Package Name to the same Package that you used to generate the Developer API Key for this application.
Plug in your Target Android device to your Development System.
Build the Application.
iOS
Ensure that your Target iOS Device and the Development System are configured to build for iOS.
- You may read the full article here for more information on this.
Configure the player settings as shown below for Target iOS devices -
Under Resolution and Presentation tab, Set the Default Orientation to Landscape Left.
Under the Other Settings tab, Set Bundle Identifier to the same Package that you used to generate the Developer API Key for this application.
Plug in your Target iOS device to your Development System.
Build the Application.
Additional steps for iOS (Unity-iPhone XCode Project)
You may have to follow these additional steps for the Unity-iPhone XCode Project to successfully build.
Ensure your signing certificate is in order.
In the Build Settings of your XCode Project and set Enable Bitcode to No as shown below.
- In the Build Settings of your XCode Project, Set the Swift Language Version to Swift 3 or above (Swift 4 is recommended).
- In the Build Settings of your XCode Project, Set the Runpath Search Paths to @executable_path/Frameworks as shown below.
- Build the Xcode Project to your iOS Device.
Running the Application
Run the built application on your Android/iOS device.
Once the application loads, it will validate the API Key and the Bundle ID. Please ensure your smartphone is connected to the Internet for the same. (An active internet connection is only required once for a new application build).
Insert the smartphone inside the Holoboard headset and enjoy the world of mixed reality!