Skip to Content

Xense AR VPS Integration Guide for iOS Native App

This document describes how to integrate Xense AR to use the VPS (Visual Positioning System) service in an iOS native application.


Download iOS Template Project

Download the iOS template project:

https://s3.educationxr.vn/ar-world/SDK/iOS/ios_template.zip 


Import xcframework Files

  1. Extract the downloaded template.
  2. Import the required xcframework files into your target project.

Alt Text

After a successful import, the project structure should include a Frameworks folder as shown below:

Alt Text

⚠️ Warning
Ensure all imported frameworks are added to Frameworks, Libraries, and Embedded Content with the correct embedding option.


Update Info.plist

Add the required permission descriptions to the Info.plist file.
Adjust the descriptions to match your application context.

Alt Text

ℹ️ Info
Camera and motion permissions are required for VPS tracking and AR rendering.


Configure AppDelegate

Import Required Protocols

  1. Import UnityFramework.
  2. Make AppDelegate inherit from:
    • UnityFrameworkListener
    • NativeCallsProtocol

Update the Url value to the endpoint provided by Xense.

Alt Text

  • The sendMessage function receives messages from Unity.
    The message parameter is a JSON string with the structure:{"type": "unityReady", "message": ""}. To send a message to Unity, use sendCommandStringInterface.

Alt Text

  1. Add the required components to initialize the Unity view.

Alt Text


Alt Text


Open Unity View

To open the Unity view, call the initUnity function implemented in AppDelegate.

Alt Text


Set Build Configuration to Release

Change the Scheme Build Configuration to Release.

Alt Text

⚠️ Warning
Running the application in Debug configuration may cause performance instability or unexpected Unity Runtime behavior.


Verify Integration

Run the application to verify that the integration is successful.


Download Versions

Version 1.0.0
https://s3.educationxr.vn/ar-world/SDK/iOS/UnityFramework.xcframework.zip 

Version 1.0.1
https://s3.educationxr.vn/ar-world/SDK/iOS/xensearsdk_1.0.1.zip 

Last updated on