Describes the desired behavior of the ARCore Cloud Anchor API.
Enumerations
GARCloudAnchorMode
GARCloudAnchorMode
Describes the desired behavior of the ARCore Cloud Anchor API.
The Cloud Anchor API uses feature maps to persist an anchor throughout sessions and across devices. See theCloud Anchors developer guidefor more information.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-07-14 UTC."],[[["\u003cp\u003e\u003ccode\u003eGARCloudAnchorMode\u003c/code\u003e controls the behavior of ARCore's Cloud Anchor API, allowing for persistent anchors across sessions and devices.\u003c/p\u003e\n"],["\u003cp\u003eBy default, Cloud Anchors are disabled (\u003ccode\u003eGARCloudAnchorModeDisabled\u003c/code\u003e), and enabling them (\u003ccode\u003eGARCloudAnchorModeEnabled\u003c/code\u003e) requires configuring token or API key authorization.\u003c/p\u003e\n"],["\u003cp\u003eWhen enabled, Cloud Anchors can be hosted and resolved using dedicated methods within the \u003ccode\u003eGARSession\u003c/code\u003e class.\u003c/p\u003e\n"],["\u003cp\u003eFeature maps are utilized by the Cloud Anchor API to achieve persistence, and further details are available in the Cloud Anchors developer guide.\u003c/p\u003e\n"]]],[],null,["# GARCloudAnchorMode\n==================\n\nSummary\n-------\n\n| ### Enumerations ||\n|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------|\n| [GARCloudAnchorMode](#garcloudanchormode)`{` ` `[GARCloudAnchorModeDisabled](#garcloudanchormodedisabled)` = 0,` ` `[GARCloudAnchorModeEnabled](#garcloudanchormodeenabled)` = 1` `}` | enum Describes the desired behavior of the ARCore Cloud Anchor API. |\n\nEnumerations\n------------\n\n### GARCloudAnchorMode\n\n```text\n GARCloudAnchorMode\n``` \nDescribes the desired behavior of the ARCore Cloud Anchor API.\n\nThe Cloud Anchor API uses feature maps to persist an anchor throughout sessions and across devices. See the [Cloud Anchors developer guide](https://developers.google.com/ar/develop/ios/cloud-anchors/developer-guide) for more information.\n\nThe default value is [GARCloudAnchorModeDisabled](/ar/reference/ios/group/GARCloudAnchorMode#garcloudanchormodedisabled). Use [GARSessionConfiguration.cloudAnchorMode](/ar/reference/ios/category/GARSessionConfiguration(CloudAnchors)#cloudanchormode) to set the desired mode.\n\n| Properties ||\n|----------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| GARCloudAnchorModeDisabled | The Cloud Anchor API is disabled. Calling [hostCloudAnchor:TTLDays:completionHandler:error: (GARSession(CloudAnchors))](/ar/reference/ios/category/GARSession(CloudAnchors)#hostcloudanchor:ttldays:completionhandler:error:) and [resolveCloudAnchorWithIdentifier:completionHandler:error: (GARSession(CloudAnchors))](/ar/reference/ios/category/GARSession(CloudAnchors)#resolvecloudanchorwithidentifier:completionhandler:error:) will result in [GARSessionErrorCodeIllegalState](/ar/reference/ios/group/GARSessionErrorCode#garsessionerrorcodeillegalstate). This is the default mode. |\n| GARCloudAnchorModeEnabled | The Cloud Anchor API is enabled. [hostCloudAnchor:TTLDays:completionHandler:error: (GARSession(CloudAnchors))](/ar/reference/ios/category/GARSession(CloudAnchors)#hostcloudanchor:ttldays:completionhandler:error:) and [resolveCloudAnchorWithIdentifier:completionHandler:error: (GARSession(CloudAnchors))](/ar/reference/ios/category/GARSession(CloudAnchors)#resolvecloudanchorwithidentifier:completionhandler:error:) can be used to host and resolve Cloud Anchors. Using this mode requires your app to configure [Token authorization or API Key authorization](https://developers.google.com/ar/develop/ios/cloud-anchors/developer-guide#authorization). Use [GARSessionConfiguration.cloudAnchorMode](/ar/reference/ios/category/GARSessionConfiguration(CloudAnchors)#cloudanchormode) to set this mode. |"]]