Stay organized with collections
Save and categorize content based on your preferences.
GARSessionErrorCode
Summary
Enumerations
GARSessionErrorCode
GARSessionErrorCode
Possible codes for NSError
s generated by a GARSession
.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-07-14 UTC.
[null,null,["Last updated 2025-07-14 UTC."],[[["\u003cp\u003e\u003ccode\u003eGARSessionErrorCode\u003c/code\u003e defines specific error codes for issues encountered when using Google's ARCore session (\u003ca href=\"/ar/reference/ios/interface/GARSession#interface_g_a_r_session\"\u003e\u003ccode\u003eGARSession\u003c/code\u003e\u003c/a\u003e).\u003c/p\u003e\n"],["\u003cp\u003eThese error codes help developers diagnose and handle problems related to device compatibility, configuration, tracking, resources, and other aspects of the AR session.\u003c/p\u003e\n"],["\u003cp\u003eErrors may indicate issues such as unsupported devices or OS versions, invalid arguments, lack of location permissions, or insufficient resources.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers should consult the documentation for each error code to understand the cause and potential solutions.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eGARSessionErrorCode\u003c/code\u003e enumeration provides a structured way to manage and address errors during AR experiences.\u003c/p\u003e\n"]]],["The `GARSessionErrorCode` enumeration defines potential error codes for `NSError`s from a `GARSession`. Codes include `DeviceNotCompatible`, `InvalidArgument`, `NotTracking`, `FrameOutOfOrder`, `AnchorNotSupportedForHosting`, `ResourceExhausted`, `LocationPermissionNotGranted`, `ConfigurationNotSupported`, and `IllegalState`. Each code indicates a specific issue, such as unsupported device/configuration, invalid arguments, insufficient resources, or lack of location permission. Errors may occur when updating the session or hosting anchors.\n"],null,["# GARSessionErrorCode\n===================\n\nSummary\n-------\n\n| ### Enumerations ||\n|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------|\n| [GARSessionErrorCode](#garsessionerrorcode)`{` ` `[GARSessionErrorCodeDeviceNotCompatible](#garsessionerrorcodedevicenotcompatible)` = -1,` ` `[GARSessionErrorCodeInvalidArgument](#garsessionerrorcodeinvalidargument)` = -2,` ` `[GARSessionErrorCodeNotTracking](#garsessionerrorcodenottracking)` = -3,` ` `[GARSessionErrorCodeFrameOutOfOrder](#garsessionerrorcodeframeoutoforder)` = -4,` ` `[GARSessionErrorCodeAnchorNotSupportedForHosting](#garsessionerrorcodeanchornotsupportedforhosting)` = -5,` ` `[GARSessionErrorCodeResourceExhausted](#garsessionerrorcoderesourceexhausted)` = -6,` ` `[GARSessionErrorCodeLocationPermissionNotGranted](#garsessionerrorcodelocationpermissionnotgranted)` = -7,` ` `[GARSessionErrorCodeConfigurationNotSupported](#garsessionerrorcodeconfigurationnotsupported)` = -8,` ` `[GARSessionErrorCodeIllegalState](#garsessionerrorcodeillegalstate)` = -9` `}` | enum Possible codes for `NSError`s generated by a [GARSession](/ar/reference/ios/interface/GARSession#interface_g_a_r_session). |\n\nEnumerations\n------------\n\n### GARSessionErrorCode\n\n```text\n GARSessionErrorCode\n``` \nPossible codes for `NSError`s generated by a [GARSession](/ar/reference/ios/interface/GARSession#interface_g_a_r_session).\n\n| Properties ||\n|-------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| GARSessionErrorCodeAnchorNotSupportedForHosting | [hostCloudAnchor:error: (GARSession(CloudAnchors))](/ar/reference/ios/category/GARSession(CloudAnchors)#hostcloudanchor:error:) was called with an unsupported `ARAnchor` type. Currently there are no unsupported anchor types. |\n| GARSessionErrorCodeConfigurationNotSupported | The configuration could not be set because it is unsupported on this device. |\n| GARSessionErrorCodeDeviceNotCompatible | This device or OS version is not currently supported. Supported OS versions are documented in `README.md`. |\n| GARSessionErrorCodeFrameOutOfOrder | An `ARFrame` was passed to [update:error: (GARSession)](/ar/reference/ios/interface/GARSession#update:error:) that is older than a previously passed in frame. **See also:** [- update:error: (GARSession)](/ar/reference/ios/interface/GARSession#update:error:) |\n| GARSessionErrorCodeIllegalState | The operation could not be completed because the session is in the wrong state. |\n| GARSessionErrorCodeInvalidArgument | An argument is `nil` or otherwise invalid (as noted in doc comment). |\n| GARSessionErrorCodeLocationPermissionNotGranted | The operation could not be completed because location permission was not granted with full accuracy. |\n| GARSessionErrorCodeNotTracking | The operation could not be completed because the `ARSession`'s current tracking state is not `ARTrackingStateNormal`. |\n| GARSessionErrorCodeResourceExhausted | There are no available resources to complete the operation. |"]]