Stay organized with collectionsSave and categorize content based on your preferences.
GARAnchor
ARCore anchor class.
AGARAnchoris an immutable snapshot of an underlying anchor at a particular timestamp. All snapshots of the same underlying anchor will have the same identifier.
[[["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\u003eGARAnchor\u003c/code\u003e is an immutable snapshot of an ARCore anchor at a specific time, with all snapshots of the same anchor sharing the same identifier.\u003c/p\u003e\n"],["\u003cp\u003eIt provides properties like \u003ccode\u003ecloudIdentifier\u003c/code\u003e, \u003ccode\u003ecloudState\u003c/code\u003e, \u003ccode\u003ehasValidTransform\u003c/code\u003e, \u003ccode\u003eidentifier\u003c/code\u003e, \u003ccode\u003eterrainState\u003c/code\u003e, \u003ccode\u003etrackingState\u003c/code\u003e, and \u003ccode\u003etransform\u003c/code\u003e to describe the anchor's characteristics and state.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003etransform\u003c/code\u003e property indicates the anchor's position and orientation relative to the world origin, but it's only valid when \u003ccode\u003ehasValidTransform\u003c/code\u003e is true.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003ecloudState\u003c/code\u003e and \u003ccode\u003eterrainState\u003c/code\u003e provide information about the status of cloud and terrain anchor operations, respectively.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers can use the \u003ccode\u003eidentifier\u003c/code\u003e property to uniquely identify and compare anchors.\u003c/p\u003e\n"]]],[],null,["# GARAnchor Class Reference\n\nGARAnchor\n=========\n\nARCore anchor class.\n\nA [GARAnchor](/ar/reference/ios/interface/GARAnchor#interface_g_a_r_anchor) is an immutable snapshot of an underlying anchor at a particular timestamp. All snapshots of the same underlying anchor will have the same identifier.\n\nSummary\n-------\n\n### Inheritance\n\nInherits from: `NSObject`, `\u003cNSCopying\u003e`\n\n| ### Properties ||\n|-----------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------|\n| [cloudIdentifier](#cloudidentifier) | `NSString *` Cloud Anchor identifier, if applicable. |\n| [cloudState](#cloudstate) | [GARCloudAnchorState](/ar/reference/ios/group/GARCloudAnchorState#garcloudanchorstate) The Cloud Anchor state, if applicable. |\n| [hasValidTransform](#hasvalidtransform) | `BOOL` Whether or not this anchor has a valid transform. |\n| [identifier](#identifier) | `NSUUID *` Unique Identifier for this anchor. |\n| [terrainState](#terrainstate) | [GARTerrainAnchorState](/ar/reference/ios/group/GARTerrainAnchorState#garterrainanchorstate) The Terrain anchor state, if applicable. |\n| [trackingState](#trackingstate) | [GARTrackingState](/ar/reference/ios/group/GARTrackingState#gartrackingstate) The tracking state of the anchor. |\n| [transform](#transform) | `matrix_float4x4` Transform of anchor relative to world origin. |\n\nProperties\n----------\n\n### cloudIdentifier\n\n```transact-sql\n@property(nonatomic, readonly, nullable) NSString *cloudIdentifier;\n``` \nCloud Anchor identifier, if applicable.\n\nThis will be `nil` unless the cloud state of the anchor is [GARCloudAnchorStateSuccess](/ar/reference/ios/group/GARCloudAnchorState#garcloudanchorstatesuccess). \nProvided by category [GARAnchor(CloudAnchors)](/ar/reference/ios/category/GARAnchor(CloudAnchors)#category_g_a_r_anchor_07_cloud_anchors_08_1ad7d3a00f3464e1e8eca8da3203d2703a). \n\n### cloudState\n\n```transact-sql\n@property(nonatomic, readonly) /ar/reference/ios/group/GARCloudAnchorState#garcloudanchorstate cloudState;\n``` \nThe Cloud Anchor state, if applicable.\n\nIndicates the state of the hosting or resolving operation on this anchor, if any. \nProvided by category [GARAnchor(CloudAnchors)](/ar/reference/ios/category/GARAnchor(CloudAnchors)#category_g_a_r_anchor_07_cloud_anchors_08_1ad07e7c3d0fc02d8987b8b73d0297ec9b). \n\n### hasValidTransform\n\n```transact-sql\n@property(nonatomic, readonly) BOOL /ar/reference/ios/interface/GARAnchor#hasvalidtransform;\n``` \nWhether or not this anchor has a valid transform.\n\nEquivalent to `self.trackingState == `[GARTrackingStateTracking](/ar/reference/ios/group/GARTrackingState#gartrackingstatetracking). \n\n### identifier\n\n```transact-sql\n@property(nonatomic, readonly) NSUUID */ar/reference/ios/interface/GARAnchor#identifier;\n``` \nUnique Identifier for this anchor.\n\n`isEqual:` will return `YES` for another [GARAnchor](/ar/reference/ios/interface/GARAnchor#interface_g_a_r_anchor) with the same identifier, and the `hash` method is also computed from the identifier. \n\n### terrainState\n\n```transact-sql\n@property(nonatomic, readonly) /ar/reference/ios/group/GARTerrainAnchorState#garterrainanchorstate terrainState;\n``` \nThe Terrain anchor state, if applicable.\n\nIndicates the state of the resolving operation on this anchor, if any. \nProvided by category [GARAnchor(Geospatial)](/ar/reference/ios/category/GARAnchor(Geospatial)#category_g_a_r_anchor_07_geospatial_08_1aa70e610288fc6447167fba1d572004b8). \n\n### trackingState\n\n```transact-sql\n@property(nonatomic, readonly) /ar/reference/ios/group/GARTrackingState#gartrackingstate /ar/reference/ios/interface/GARAnchor#trackingstate;\n``` \nThe tracking state of the anchor. \n\n### transform\n\n```transact-sql\n@property(nonatomic, readonly) matrix_float4x4 /ar/reference/ios/interface/GARAnchor#transform;\n``` \nTransform of anchor relative to world origin.\n\nThis should only be considered valid if the property [hasValidTransform](/ar/reference/ios/interface/GARAnchor#hasvalidtransform) returns `YES`."]]