Skip to Content
API ReferenceiOS SDKSupporting Types

Supporting public types

All types below require iOS 18.0+. Use import GraffityARCloud.

GraffityARMode

Sendable, Equatable enum:

CaseExperience
.arContentImmediate VPS localization and content, without destination UI. Collection is enabled by userId.
.navigationDefault. Destination picker first, then AR localization and guidance. Minimap remains a separate opt-in.

Sendable, Equatable struct with read-only poiId: String?, placeId: String?, and sectionId: String?.

init(poiId: String? = nil, placeId: String? = nil, sectionId: String? = nil)

Identifiers open the initial picker at a place, section, or source-prefixed POI. See deep links.

GraffityARMinimapConfiguration

Sendable struct with read-only isEnabled: Bool. Construct with init(isEnabled: Bool) or use .enabled / .disabled. Disabled is the default; enabled is honored only for navigation.

GraffityARDestination

Sendable, Equatable struct with read-only id: String, displayName: String, and category: String?.

init(id: String, displayName: String, category: String?)

Returned in navigation callbacks. The display name is localized; the ID uses the picker/SDK source namespace.

GraffityARActivity

Sendable, Codable, Equatable collection result. All properties are read-only. The public initializer takes all arguments, with no defaults, in this order:

init(id:projectId:playerId:isFinished:collectedContentIds:maxCollectionSize:bannerImageURL:collectionEmptyImageURL:collectionActiveImageURL:lastModified:)

See activity fields and types.

GraffityAROpenURLSource

Sendable, Equatable enum with .arContent(contentId: String) and .map. Used by the delegate’s URL request method. See URL interception.

GraffityARTheme

Sendable palette with read-only UIColor slots. Use .default, the color initializer, or the failable hex initializer.

init(primary:secondary:surface:onSurface:onSurfaceSecondary:danger:) defaults each argument to its matching static color constant: defaultPrimary, defaultSecondary, defaultSurface, defaultOnSurface, defaultOnSurfaceSecondary, and defaultDanger.

init?(primaryHex: String, secondaryHex: String) customizes the two brand slots; invalid strings return nil. See palette values and limits.

GraffityARLogLevel

Int-backed, Sendable, Comparable, CaseIterable enum: .debug, .info, .warning, .error, ordered from lowest to highest.

GraffityARLogger

AnyObject, Sendable protocol with this method:

func log(_ level: GraffityARLogLevel, _ message: @autoclosure () -> String, file: String, line: Int)

Implement a thread-safe sink. See logger examples.

GraffityARLogging

Sendable struct with read-only logger: GraffityARLogger? and minimumLevel: GraffityARLogLevel.

Factory / initializerBehavior
.defaultDefault os.Logger sink, minimum .info.
.disabledConfigures a nil sink and minimum .error; current implementation still uses fallback logging for errors.
.custom(_ logger: GraffityARLogger, minimum: GraffityARLogLevel = .info)Consumer sink and minimum level.
init(logger: GraffityARLogger?, minimumLevel: GraffityARLogLevel)Explicit settings; a nil sink uses fallback logging.

Use a no-op sink for silence.

GraffityARTelemetry

Sendable, Equatable, CaseIterable enum: .enabled or .disabled. .default is .disabled. See runtime controls.

GraffityARLocalizationProvider

Sendable protocol declaring func string(forKey key: String, locale: Locale) -> String?. Returning nil allows bundled copy to be used by internal consumers.

The public configuration currently has no injection point for this protocol, so external apps cannot install a provider. See language support.