A view that presents visual instructions that guide the user.
- iOS 13.0+
This view offers your users a standardized onboarding routine. You can configure this view to automatically display during session initialization and in limited tracking situations, while giving the user specific instructions that best facilitate ARKit's world tracking.
These illustrations show overlay views with horizontal- and vertical-plane goals, indicating that the user should begin moving the device:
These illustrations show overlay views indicating that the user should continue moving the phone or change the speed with which they move it:
When you start your app, the coaching overlay asks the user to move the device in ways that help ARKit establish tracking. When you choose a specific goal like finding a plane, the view tailors its instructions accordingly. After the coaching overlay determines the goal has been met and no further coaching is required, it hides from the user's view.
For an example app that uses the coaching overlay, see Placing Objects and Handling 3D Interaction.
Supporting Automatic Coaching
activates is enabled and therefore you should override
coaching to determine whether coaching is in progress. Coordinate your actions to help the user focus on these instructions, for example, by hiding any UI that's not necessary while the session reinitializes.
Relocalizing After an Interruption
If relocalization is enabled (see
session), ARKit attempts to restore your session if any interruptions degrade your app's tracking state. In this event, the coaching overlay presents itself and gives the user instructions to assist ARKit with relocalizing.
During this time, the coaching overlay includes a button that lets the user indicate they'd like to start over rather than restore the session.
ARKit notifies you when the user presses Start Over by calling your delegate's
coaching function. Implement this callback if your app requires any custom actions to restart the AR experience.
If you do not implement
coaching, the coaching overlay responds to the Start Over button by resetting tracking, which also removes any existing anchors.
For more information about relocalization, see Managing Session Lifecycle and Tracking Quality.