This page covers the preserved raw-map API in the iOS v0.3.4 tag.
Core types
| Type | Responsibility |
|---|---|
SeatLayerView |
UIView map host, load lifecycle, and async commands |
SeatLayerConfiguration |
Event, locale, currency, selection rules, credential provider, and timeouts |
SeatLayerViewDelegate |
Typed readiness and SDK events |
BuyerAccessTokenProvider |
@Sendable async closure that renews private buyer access |
HoldResult |
Opaque hold ID, server expiry, selected seats, and display line items |
SeatLayerError |
Typed load, access, timeout, compatibility, and command failures |
Configuration
var configuration = SeatLayerConfiguration(
event: "ev_your_event_key",
maxSelection: 6,
locale: "en",
currency: "USD",
colorblindSafe: false
)
configuration.buyerAccessTokenProvider = { context in
try await buyerBackend.mintSeatLayerAccess(reason: context.reason)
}The provider returns BuyerAccessToken(token:expiresAt:). Tokens remain in
memory and do not belong in URLs, logs, analytics, or persistent
storage.
Mint the native buyer-access session on your backend through
buyer access sessions, return only its
short-lived token, and treat SDK access details as opaque. See the
tagged configuration source
for every field in 0.3.4: identity/access, selection policy, locale/messages,
currency, view mode, deadlines, host diagnostics, and development overrides.
Load and readiness
seatMap.delegate = self
do {
let info = try await seatMap.load(configuration)
switch info.mode {
case .test: showTestMode()
case .live: break
default: break
}
} catch {
showLoadError(error)
}Await readiness before sending a command. A failed command throws at its own call site; an out-of-band SDK failure reaches the delegate.
Common command groups
This is a task map, not an exhaustive replacement for the tagged declarations.
| Group | Methods |
|---|---|
| Read | getSelection, getSelectionValidity, getCurrentHold, getGAAreas, getFloors, getViewMode |
| Select | selectObjects, deselectObjects, clearSelection, selectCategories, deselectCategories, setSelectableObjects, setMaxSelection, setSeatTier |
| Hold | hold, resumeHold, extendHold, release, releaseLabels, bestAvailable, holdGA |
| Access | refreshAccess |
| Map | setFloor, setColorblindSafe, setViewMode, zoomIn, zoomOut, zoomToFit |
| Session | destroy |
Use the
tagged SeatLayerView API
for exact labels, return types, and all methods. Use reported SDK capabilities
to decide whether to show an optional control.
Capability failures are typed. Do not show a native control merely because a method exists; use the reported capability information and handle unsupported commands deliberately.
Delegate model
Implement the SeatLayerViewDelegate methods your screen needs. Important
event families are:
- chart ready and structured error;
- complete current selection and selection validity;
- buyer-access expiry or unavailability;
- hold changed, restored, or expired;
- general-admission area tap and seat hover;
- selected inventory becoming unavailable; and
- unknown future event.
Unknown values remain inspectable so an additive SDK event does not crash an older binary.
Exact signatures include:
func seatLayerView(
_ view: SeatLayerView,
selectionDidChange seats: [SelectedSeat]
)
func seatLayerView(
_ view: SeatLayerView,
selectionValidityDidChange validity: SelectionValidity
)
func seatLayerViewHoldDidExpire(_ view: SeatLayerView)
func seatLayerView(
_ view: SeatLayerView,
didFailWith error: SeatLayerError
)Selection callbacks carry complete replacement state. Hold expiry is
authoritative, and didFailWith is for out-of-band failure; awaited commands
throw at their own call site. The
tagged delegate declaration
lists every event and payload.
Restore a checkout
if let restored = try await seatMap.resumeHold(holdId: persistedHoldId) {
updateCheckoutExpiry(restored.expiresAt)
} else {
returnBuyerToSelection()
}Persist a hold ID only when your product promises checkout restoration. Never log it, and never infer that a hold still exists from a local countdown.
SwiftUI wrapper boundary
When intentionally using the raw map from SwiftUI, one UIViewRepresentable
owns the SeatLayerView and delegate coordinator. Updating unrelated SwiftUI
state must not recreate the map. Most SwiftUI applications should use the
complete SeatLayerPicker or SeatLayerPickerScope instead.