Xense AR WebGL SDK Integration Guide for iOS Native App
1. Download WebGL SDK
Download the WebGL SDK at the following link:
https://s3.educationxr.vn/ar-world/SDK/WebGL/XenseARWebGL.framework.zip
2. Import Framework into Project
- Extract the downloaded
.zipfile. - Import
XenseARWebGL.frameworkinto your iOS project. - Ensure the framework is added to:
- Frameworks, Libraries, and Embedded Content
- Target Build Phases → Link Binary With Libraries
⚠️ Warning
Verify that the framework is embedded correctly (Embed & Sign) to avoid runtime loading errors.
3. Implement SDK Usage
import UIKit
import WebKit
class ViewController: UIViewController,WKNavigationDelegate {
var webView: WKWebView!
var objcController: ViewControllerSDK! // Objective-C class
override func viewDidLoad() {
super.viewDidLoad()
// Create UIView and WKWebView
let containerView = UIView(frame: self.view.bounds)
containerView.backgroundColor = .white
self.view.addSubview(containerView)
webView = WKWebView(frame: containerView.bounds)
containerView.addSubview(webView)
objcController = ViewControllerSDK(view: containerView, webView: webView)
objcController.loadURL("https://s3.educationxr.vn/ar-world/Demo/XenseARWebGL/NoLog/WebXR/index.html?worldID=mhmp_blossom&blockID=3e2a6da2-e248-4dd7-9f09-d5ffbaa17b31&modelScale=1.25") //url provided by Xense
}
}
Last updated on