Embed in iOS apps¶
This page explains how to embed a Minsar experience in your iOS (Swift/Objective C) app and explains the scenarios and options available.
iOS Embed will be available to all Minsar users by September 2021.
Beta Testers only
The documentation below only applies to Minsar Insiders using a pre-release version of Minsar.
Documentation on the SDK is found below, though you might want to see the source code of an app that would use MinsarKit. We provide a few samples here: Minsar SDK Samples repository on Github.
These apps will be made available on the iOS App Store and Google Play Store for demonstration purposes.
MinsarKit SDK requires:
- Xcode 12+
- iOS SDK 14+
MinsarKit can easily be added to your project using CocoaPods or by adding the
MinsarKit.framework file in the
Embedded Binaries section of your Xcode project.
You may update your
Podfile as below:
platform :ios, '14.0' target '%APP_NAME%' do use_frameworks! pod ‘MinsarKit', :http => "$CONTACT_US_FOR_SDK_URL" end
MinsarKit SDK must be initialized before attempting to open an experience:
The API Key can be retrieved in the Portal.
This call will throw if the
apiKey is invalid, or if the device doesn't support AR.
The SDK can be safely initialized at any moment, such as in your AppDelegate's
Before quitting, the
MinsarKit should be destroyed:
Play an experience¶
Once the SDK is initialized, developers can play an experience with a single line of code:
MinsarKit.shared.openExperience(experienceId: String, sceneId: String?, renderer: MTKView?)
renderer parameter is optional: if it isn't set, MinsarKit will play the experience in fullscreen.
It will throw if:
- the mandatory
sceneIdis invalid (a GUID is expected)
MinsarKitis already playing an experience
- the experience is not found or has no associated Launch Plan
- the device can't play this experience
MinsarKitcan’t open this experience for compatibility reasons
Enter or Leave XR¶
Enter or leave fullscreen¶
Close an experience¶
Developers are responsible of stopping the experience visualization: