With TeamViewer Software Development Kit (SDK) you can utilize full Assist AR functionality and provide the best AR remote support experience to your customers by embedding AR remote assistance capabilities within your own mobile apps.
The SDK enables you to have secure and GDPR compliant connections to your customer's devices.
This article applies to all TeamViewer Assist AR users.
If you don't have a TeamViewer account, follow the steps below to create one:
1) Go to https://login.teamviewer.com/ and sign in using your TeamViewer account.
2) On the bottom of the page, click Apps.
3) Click the Create App button.
4) Activate Mobile SDK Token, enter a name, and (optional) add a short description.
5) Activate iOS.
6) Click Create.
Your token is displayed when opening the created app:
Copy this token into your clipboard and paste it to a secure place.
🚨IMPORTANT: Do not share this token with anyone!
There are two possibilities to install the TeamViewer Mobile SDK:
The easiest way to get the TeamViewer SDK is via CocoaPods. To add the SDK to your project, add this to your Pod file:
platform :ios, '12.0' target YOUR_TARGET do use_frameworks! pod 'TeamViewerSDK' end
1) The SDK is available for customers with an Assist AR Professional license and is distributed by the TeamViewer Support team.
2) Download the .zip file, decompress and copy all the included xcframework folders inside of your project folder.
📌Note: The SDK is distributed as universal XCFramework containing both architectures, iOS arm64 and Simulator x86. We currently do not support Apple Silicon or Mac Catalyst architectures.
3) Link the TVLocalizations and TeamViewerSDK frameworks to your project.
4) Make sure that the option Embed & Sign is selected.
5) You might also need to link against ARKit and CallKit, depending on your implementation.
6) Only if you plan to support CallKit: Link against CallKit.
The TeamViewer SDK uses the camera and microphone during a remote support session.
1) Add the following keys to the Info.Plist file:
If you do not add those keys, iOS will terminate the application the moment the SDK tries to access the microphone or camera.
🚨IMPORTANT: The SDK is a single instance class. You cannot directly create one. You should access the shared instance.
1) Initialize the SDK instance with your API Key obtained in the section Prerequisites.
2) Set a delegate conforming to the protocol TeamViewerSDKDelegate.
This ensures you are able to react to events happening during the lifetime of your TeamViewer connection.
3) Connect to a session code
The shared SDK provides a method for establishing a connection to a session code. This session code can be of two types:
4) Create session codes in your TeamViewer client or via the TeamViewer REST API.
The method connectToSessionCode returns a TeamViewer session.
🚨IMPORTANT: You are responsible for keeping this variable alive, and also responsible for freeing up this variable. Failing to do so might result in the session UI being kept alive even after the remote session has ended.
🚨IMPORTANT: Once the SDK connects to a session code, it enters a waiting state, you get notified about the state change via the delegate method handleSessionCodeOnline.
At this point, you should not allow the user to connect to a different session code. It is only allowed to allow the user to leave the current connection.
On the supporter side, the session code will appear as being online, allowing the client to establish a connection to that session code.
The SDK provides delegate methods for reacting to incoming connection events.
Once the connection is initiated on the TeamViewer side, the SDK gets notified about this connection attempt via the delegate method handleConnectionRequestWithAuthenticationData.
On the authentication data parameter there is the name of the supporter, the type of incoming connection (ScreenShare or Assist AR) and a callback function to allow or reject the incoming connection.
If the incoming connection is accepted, the corresponding TeamViewer connection is established.
The UI of your application is grabbed using the replay kit and there is bi-directional VoIP communication between the user and the supporter.
💡Hint: You should clean the references to the session as the session is considered no longer valid at this point.
💡Hint: You should clean the resources used for the current session as the session itself is considered invalid.
💡Hint: This error is only informative. You can write it to a log file.
If your application supports CallKit:
Ensure that you have at least one of these background modes enabled in your Info.plist file:
🚨IMPORTANT: Failing to do so will cause the app to get suspended only a few seconds after being put in the background during an active TeamViewer session.
The mobile SDK works with the default AVAudioSession configuration values.
In case you want to use another means for establishing voice communication, you can disable the VoIP feature entirely by setting the options on the shared SDK instance prior to establishing a connection.
For more information refer to the TVSDKOptions
documentation.
All public headers are documented. For detailed information about each class, please refer to the QuickHelp content generated by Xcode ('⌥ '+ click on constant or variable name).