trackAnchor
Declaration
func trackAnchor(payload: String) throws -> NSDKVpsAnchorId
Summary
Returns
The unique identifier of the anchor encoded in the payload.
Throws
NSDKError.invalidArgumentif the payload is not valid.
Notice
Warning: An anchor payload is no longer the preferred method to identify the map to localize against. Target a map by site ID with localize(siteId:) or by coordinate with localize(latitude:longitude:radiusMeters:). An anchor is tied to the site asset it was created against, so it will not resolve against a different site or a different asset of the same site.
Parameters
| Name | Type | Summary |
|---|---|---|
| payload | String | Base64-encoded anchor payload. |
Requests to start tracking an anchor specified by a payload.
Use this only to restore an AR anchor the app created itself with
createAnchor(at:)and saved fromanchorPayload(anchorId:)orcreatedAnchorPayload.The returned anchor ID is automatically polled each frame via
update(), and updatesare published on
anchorUpdated.