Documentation
¶
Overview ¶
Package workoutkit provides Go bindings for Apple's WorkoutKit SwiftUI cross-import overlay (_WorkoutKit_SwiftUI).
This overlay provides SwiftUI views and modifiers that integrate WorkoutKit with SwiftUI. View constructors and modifiers return typed swiftui.View values.
Bridge sources under internal/swift/ are generated by go generate.
Threading ¶
All bridge functions dispatch to the main thread internally. The Go API is safe to call from any goroutine.
Quick start ¶
import "github.com/tmc/swiftui" import "github.com/tmc/swiftui/workoutkit" view := workoutkit.NewWorkoutPreview(...)
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Available ¶
func Available() bool
Available reports whether the WorkoutKit bridge dylib loaded successfully.
func Err ¶
func Err() error
Err reports the error encountered while loading the WorkoutKit bridge, or nil if the bridge loaded successfully.
func NewWorkoutPreview ¶
NewWorkoutPreview creates a WorkoutPreview view for a workout composition.
Types ¶
This section is empty.