Download and install
Embed consent-first support in a SwiftUI app with ReplayKit capture, registered actions, and pre-publication redaction.
Requirements
- ✓iOS 16+
- ✓Xcode with Swift Package Manager
- ✓LiveKit Swift 2.0+
Start with explicit consent
Replace pk_dev_… with the Development key shown once when you create it in the console. Use the one-time pk_live_… key from the Production environment after paid activation.
import ScreenSteerKit
let session = ScreenSteerSession(config: ScreenSteerConfig(
baseURL: URL(string: "https://screensteer.com")!,
publishableKey: "pk_dev_…"
))
// Call only after your consent sheet is approved.
await session.start(externalUserId: user.id)Configure the SDK after installation
Create one ScreenSteerSession for the support surface and configure it with the ScreenSteer base URL and a Development publishable key from your console app.
The key is safe to embed in the client because it can only create attended sessions. ScreenSteer shows the full value once; store it in your build configuration rather than committing it to source.
Register actions and redact private views
Attach screenSteerAction only to operations an agent may invoke. Everything else remains unavailable over the wire.
Apply screenSteerRedacted to account, payment, or other private views. The SDK masks those pixels before ReplayKit publishes a frame.
Button("Refresh work orders") { store.refresh() }
.screenSteerAction("workorders.refresh", session: session) {
store.refresh()
}
AccountDetailsView()
.screenSteerRedacted("account-details", session: session)Start only after view consent
Present your own explanation or the included ScreenSteerConsentSheet before calling session.start. ReplayKit and the LiveKit room must not start before approval.
Keep ScreenSteerBanner visible for the entire session so users can see the support state and always stop sharing.
Handle control consent and teardown
When pendingControlRequest appears, show ScreenSteerControlSheet and call grantControl or rejectControl from the user’s decision.
Expose revokeControl while control is active. session.end must remain available regardless of connection or controller state.
What the device enforces
- ●Separate view and control consent, with revoke and Stop always available.
- ●Session, expiry, sender sequence, controller lease, and layout revision validation.
- ●Only registered and enabled actions can execute.
- ●Redaction is applied to the pixel buffer before publication.
Smoke test
- 1Run CommandValidatorTests from the downloaded package.
- 2Create a Development key and configure it outside source control.
- 3Start a session from an explicit consent action on a physical target device.
- 4Join from Console → Sessions and verify video plus the persistent support banner.
- 5Request control, approve it on-device, and invoke a registered action.
- 6Rotate the device and verify stale geometry fails closed before the next layout update.
- 7Stop from both the device and agent sides in separate runs.
Troubleshooting
The package does not compile with the installed LiveKit version
The Swift SDK is Beta. Confirm LiveKit Swift 2.0 or newer, run the included tests, and adjust minor LiveKit API changes if the upstream SDK moved.
A registered action returns stale_layout
Report fresh element geometry after rotation, resize, navigation, or any layout change.
Private content appears in a frame
Confirm the view has screenSteerRedacted applied and validate on the exact ReplayKit capture path used by the app.