# Working on this project This is a WAI project made from the `apple-app` template: a SwiftUI player whose stream goes through the WAI native sink, and a recorded playback session (`sample-session.json`) replayed through it. `Sources/WaiApp/PlayerApp.swift` is the whole integration: a `WaiSink.Config`, a `WaiPlayerSession`, and its `player` in a `VideoPlayer`. - **Build.** The sink is the `wai-sink-swift` package of the WAI repository: build its macOS slice once (`WAI_SINK_SLICES=macos scripts/build-xcframework.sh` there), set `WAI_SINK_SWIFT` to that package's directory, then `swift build`. - **Run.** `swift run WaiApp`, and give it an HLS address (the `package-and-deliver` template's, under `wai dev`, by default). - **Test.** `swift run WaiApp --replay sample-session.json` replays the recorded session through the sink, prints how many playlists and objects went through it, and exits 0 when the bundle verifies. Run it after every change. - **Conform.** For a stream its owner seals, set `requireSigned: true`: nothing the owner did not sign then reaches the decoder. Never turn that off to make a stream play. - `wai.json` is the project file; its `$schema` names the schema editors validate it with. Keep `name` a lowercase DNS label. - Never put a key, a token or any other secret in this repository. - WAI's tools for a coding agent: `wai mcp` (`wai setup-agent` registers it).