ENUM
VpsAnchorUpdate.AnchorTrackingStateReason
enum AnchorTrackingStateReason
Provides additional context about why an anchor is in a particular tracking state.
When an anchor is not tracked or has limited tracking, this enum provides specific reasons that can help developers understand and respond to tracking issues.
Overview
Tracking state reasons help diagnose why tracking may be failing or limited, enabling applications to provide appropriate user feedback or take corrective actions.
Example Usage
let (status, update) = vpsSession.getAnchorUpdate(anchorId: anchorId)
if status.isOk() {
switch update.trackingStateReason {
case .initializing:
print("Anchor is still initializing - tracking will improve")
case .permissionDenied:
print("Tracking failed due to permission issues")
case .fatalNetworkError:
print("Network error preventing tracking")
default:
print("Other tracking issue: \(update.trackingStateReason)")
}
}
Cases
none
case none
No specific reason for the current tracking state.
This is the default state when tracking is working normally or when no specific reason has been identified for tracking issues.
initializing
case initializing
The anchor is currently initializing and tracking will improve.
This reason indicates that the system is still processing the anchor's visual features and tracking quality should improve over time.
removed
case removed
The anchor has been explicitly removed from tracking.
This reason indicates that the anchor was removed via removeAnchor(withId:)
and is no longer being tracked by the system.
internalError
case internalError
An internal error occurred within the tracking system.
This reason indicates a system-level error that prevented normal tracking. The application should check the VPS feature status for more details.
permissionDenied
case permissionDenied
Tracking failed due to insufficient permissions.
This reason indicates that the anchor target requested is not accessible by the current authenticated user. Check that the API key or authentication token has the necessary permissions and organization access.
fatalNetworkError
case fatalNetworkError
A fatal network error prevented tracking.
This reason indicates that network connectivity issues are preventing the VPS system from functioning properly.
Properties
isError
public var isError: Bool