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, callBBShortsState/destroy()from.onDisappearto ensure timely cleanup. The convenienceinit(jsonUrl:options:)handles this automatically.