Building the App
1. Import the Lens module into your project.
2. Create an object "LensCustomer" using the CustomerSessionParam.
3. Make sure you have added the usage descriptions listed below in your XCode project info.plist.
1. NSMicrophoneUsageDescription
2. NSPhotoLibraryUsageDescription
3. NSCameraUsageDescription
Lens customer session object creation:
Once you have validated the session successfully you will be received a CustomerSession param.
Using that param you have to create an object "LensCustomer".
lensObject = .init(connectionParam: self.connectionParam, name: "email@example.com")
lensObject?.startSession(inArMode: ARRenderView.checkARKitCompatibility())
lensObject?.lensSignallingDelegate = self
ARRenderingView Class:
- We have a separate class for ARRendering view in which both customers and technicians can annotate.
- You can enable HD camera, AR point cloud, and clear AR annotations using the ARRenderingView instance.
- Technicians and Customers can select and delete an AR annotation of their choice.
Code
CopiedLensCustomer.validateSession(sessionKey: id, base: URL.init(string: "https://lens.zoho.com")!, token:token) { (validation) in
switch validation {
case .error(let error):
print(error!)
case .validCustomer(let param):
self.connectionParam = param
DispatchQueue.main.async {
self.performSegue(withIdentifier: "streamingcontroller", sender: nil)
}
default:
break
}
}