Skip to content

Controllers

This page documents the primary iOS controller APIs exposed by WorkoutKit.

DocC symbol source is available at:

https://github.com/fysiki/workoutkit-ios-sdk/blob/main/documentation/FZWorkoutKit.doccarchive.zip

GoModeController (classic workouts)

GoModeController is the UIKit entry point for classic workouts.

If you see MonGoModeController in the sample app, treat it as an example host subclass of GoModeController, not as part of the public SDK naming.

Initializer:

swift
init(data: Data, token: String? = nil, configuration: [String: Any]? = nil)

High-signal methods:

MethodDescription
saveSession(state:)Triggered when WorkoutKit requires session persistence within the host app.
displayPostWorkout() -> AnyPublisher<Void, Never>Called after normal workout completion (not quit).
quitWorkout()Called when workout is exited without save.
trackEvent(_:properties:)Tracking callback for host analytics integration.
log(_:context:)Debug/log callback with optional metadata context.
shouldDisplayCloseButton()UI behavior customization hook.

GoVideoController (video workouts)

GoVideoController is the UIKit entry point for streaming workouts and remote-media integrations.

If you see MonVideoGoController in the sample app, treat it as an example host subclass of GoVideoController, not as part of the public SDK naming.

Common initializer variant:

swift
init(data: Data, localStream: Bool = false, token: String? = nil, configuration: [String: Any]? = nil)

High-signal properties:

PropertyDescription
videoCurrent video model used by the controller.
metadataVideo metadata used for timeline/cover/title operations.
remoteManagerRemote media bridge (cast/remote playback integration).
leftItemsLeft-side UI action items in video controller chrome.

High-signal methods:

MethodDescription
saveSession(state:)Same persistence callback model as classic controller.
displayPostWorkout() -> AnyPublisher<Void, Never>Post-workout completion callback.
quitWorkout()Quit callback for non-saved exits.
trackEvent(_:properties:)Tracking callback for host analytics integration.
log(_:context:)Debug/log callback with optional metadata context.

The video controller also includes default implementations for RemoteManagerDelegate and picture-in-picture delegate behaviors.

Other controller symbols in DocC

The archive also exposes ExerciseController and ExerciseVideoController, used for exercise-level UI surfaces around media and detailed exercise content.

Host override guidance

In host subclasses, keep overrides focused on business integration and always call super for lifecycle callbacks such as saveSession(state:) and quitWorkout().