iOS
iOS, from install to paywall
A SwiftUI sample app on a real iPhone, using BillDog's published iOS Swift package 1.1.1-beta.5. It adds the package, configures the SDK once in the App struct's init with a sandbox key, fetches a paywall by its dashboard identifier and presents it with the .paywall modifier. Then the headline is changed in the dashboard: after a relaunch the first open shows the cached copy and the next open shows the new one.
What this video covers: Filmed on iOS only, on a real iPhone, with the published Swift package 1.1.1-beta.5. No purchase is made, and taps are driven by a launch argument, not a finger. Cached-then-new is the default cache behaviour: a disk copy up to 7 days old is shown while the new one downloads. The binaries are built with Swift 6.3.
Transcript
This is a SwiftUI app on a real iPhone. The paywall comes from the dashboard: the app only knows its identifier.
It’s a small sample app we built for this video. The code that matters is on screen.
The SDK is a Swift package. In Xcode, add the package by its repository URL, and add the BillDogFull product to your app target. This sample pins the exact version: 1.1.1-beta.5.
You need iOS 15 or later, and Xcode 26 or newer to build it.
Configure once, at startup, in your App struct’s init. Import BillDogFull, and pass your project’s public sandbox key.
Leave the environment on production. That setting picks the server, and staging isn’t publicly available.
Then two calls. fetchPaywall takes the identifier you gave the paywall in the dashboard, and returns its configuration. The paywall modifier presents it: as a sheet here, or full screen if that’s the display style you chose.
There’s no button handling in this code. With the modifier, a purchase tap goes to the SDK’s purchase, and the close button closes the paywall.
Now the dashboard. Change the headline, and publish the update.
Back on the phone, relaunch the same build. The first open shows the copy the phone had cached, and fetches the new one in the background.
The next open has the new headline.
Add the package, configure once at startup, then fetch and present by identifier. The paywall’s copy lives in the dashboard.