Augmented Reality Preview
On devices that support it, the ip.labs Mobile SDK offers an augmented reality (AR) preview for wall décor products from within the editor (starting from iOS 15.4). Users can virtually position their creation on a wall in their home and view it in its original size.
Feature Configuration
By default the AR feature for wall décor is activated. If you don’t want to offer it to your users (e.g. because you have no such products in your portfolio) you can deactivate it by setting the enableArForWallDecor
feature toggle to false
. Please check our customization docs for further details.
Requirements
There are a few requirements that must be met for AR functionality to work:
- The device supports AR. This should be the case for every supported iOS device but will be checked nevertheless.
- The device must be running iOS 15.4 or newer
- The product in the editor is a wall décor.
- The key for camera permission is set in the
info.plist
More information on that can be found below.
Camera Permission for AR
The AR preview needs the permission to use the camera of the device. Unless this permission has not been granted before to the app, the camera permission prompt will open the first time the user starts the AR preview.
iOS requires you to provide a value for the NSCameraUsageDescription
key in the info.plist
of your app. This string will be shown in the prompt to the user to explain the need for the camera permission.
Please make sure to properly describe the reason for the camera usage. If the key is not present in the info.plist
, the AR button will not be shown in the editor.
If the user rejects the camera permission, the AR preview is still offered but an error message will be shown, describing how the user can give the permission in the settings of the app. It is not possible for an iOS app to show a permission prompt again if the user has rejected it. Thus the only way to revert the rejection is through the iOS settings for the app.
Usage of the AR Preview Feature
If everything is set up correctly and all requirements are met, users will see an additional view mode button in the editor below their wall décor product with the standard AR icon on it:
Tapping this button will open a tutorial dialog which explains all crucial steps to the user. Like any other text of the editor UI, those explanations can be adjusted in the translations JSON file. Look for keys containing arpreview
. For more information on how to customize texts, refer to Translating Texts