Skip to main content

BBNativeShorts

struct BBNativeShorts: View

A SwiftUI wrapper for BBNativeShortsView.

Embeds the Blue Billywig Shorts experience in a SwiftUI layout.

Minimal usage (fire-and-forget, auto-cleanup)

BBNativeShorts(
jsonUrl: "https://demo.bbvms.com/sh/1.json",
options: BBShortsOptions(displayFormat: "full")
)

Full control

struct ShortsScreen: View {
@State private var shortsState = BBShortsState()

var body: some View {
BBNativeShorts(
jsonUrl: "https://demo.bbvms.com/sh/1.json",
options: BBShortsOptions(displayFormat: "full"),
state: shortsState
)
.onDisappear { shortsState.destroy() }
}
}

Important: When using the init(jsonUrl:options:state:) initializer, call BBShortsState/destroy() from .onDisappear to ensure timely cleanup. The convenience init(jsonUrl:options:) handles this automatically.