billdog_flutter 1.2.0-beta.1
billdog_flutter: ^1.2.0-beta.1 copied to clipboard
BillDog SDK for Flutter — monetization, paywalls, subscriptions and BillDog Auth sign-in. Thin bridge over the native iOS/Android SDKs with inline native paywall rendering.
Changelog #
All notable changes to the BillDog Flutter SDK will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
1.2.0-beta.1 - 2026-11-20 #
EntitlementInfo.isInBillingRetry: the store is retrying a failed renewal of the subscription behind the entitlement (the server now reports thebilling_retrystate).
1.1.2-beta.5 - 2026-11-18 #
Changed — the RevenueCat bridge (billdog_revenuecat) #
- Ready for pub.dev: it ships at the suite version, pins
billdog_flutterexactly and allowspurchases_flutter10.1 to 11.x. The README no longer points at a private Git repository. It is published once its device testing is done. - With RevenueCat configured
purchasesAreCompletedBy: myApp, BillDog's native SDK owns finishing for the bridge: it records each purchase while it is unfinished, then finishes, acknowledges or consumes it, so consumables are recorded on iOS and Android. Before, nothing finished such a purchase and Google Play refunded it after 3 days. Only the RevenueCat bridge (PurchaseCapability.revenueCatBridge) gets this. The plugin reads the mode natively (revenueCatPurchasesAreCompletedBy,billDogFinishesTransactions). - iOS: promotional offers, signed by RevenueCat (
PurchaseCapability.signsPromotionalOffers); an offer it can't sign or the App Store refuses is bought at the standard price and reported (promotional_offer_not_applied). - Android: the catalogue id native hands over (
sku:basePlan:offer) is split, so RevenueCat is asked for Play's own product id; a product id that pinned a base plan or offer used to be "product not found" every time. A base plan RevenueCat doesn't list is "product not found", never another plan; an offer Play doesn't list for the user buys the base plan. restoreOnLaunchonly reads RevenueCat's customer info instead of callingrestorePurchases, which can ask for an App Store sign-in. It doesn't sync either: RevenueCat'ssyncPurchasescan alias app user ids and is meant for apps that don't buy through RevenueCat.- A failed RevenueCat purchase reaches the native SDK as the matching BillDog error (network, store error with RevenueCat's code, product not found, configuration…) instead of an unknown error.
- iOS can sell Apple's 12-month commitment plans (
billingPlanscapability) withpurchases_flutter10.16 or later. RevenueCatGatewaygainedgetCustomerInfo(),purchasesAreCompletedBy(),billDogFinishesTransactions()andgetPromotionalOffer(), andBillDogRecordergainedreportPromotionalOfferNotApplied(); custom implementations must add them.
Fixed — purchases report the product bought (Android) #
billdog_revenuecatreturned the Play transaction's product on Android: the subscription id only (premiumforpremium:yearly), and for a DEFERRED plan change the product being replaced. It now returns the product the purchase was made with. With the native SDK's matching fix,purchase_completed, the purchase callbacks andpurchase()'s result name the product bought; a plan change addsproduct_changeand carries a price only when Play charges the full price at the change.
Added — monthly plans with a 12-month commitment #
Product.installmentsInfo(InstallmentsInfo) for Apple's monthly-with-12-month-commitment plan ("<yearly-id>:monthly", iOS 26.4+, not in the US or Singapore) and Play installment plans;priceis the installment, andpurchasePackagebuys the monthly plan.Entitlement.commitment(EntitlementCommitment). Guide: https://billdog.io/docs/commitment-plans
Changed — iOS installs without the BillDogFull CocoaPods trunk pod #
- The plugin no longer depends on the
BillDogFullpod from CocoaPods trunk, which takes no new versions after 2 December 2026. - With CocoaPods (SwiftPM off), the plugin's pod vendors
BillDogFull.xcframework: atpod install,billdog_ios_binary.rbdownloads it from thebilldogai/billdog-ios-spmGitHub release for this version and refuses it unless its SHA-256 matches the package'sios/ios-binary.json. The firstpod installneeds network access to github.com; the zip is then cached in~/Library/Caches/BillDog. - With Swift Package Manager on,
Package.swiftresolvesbilldog-ios-spmat exactly this version (it wasfrom: 1.0.2-beta.3), the same binary the CocoaPods path checks. It no longer declares theFlutterFrameworkpackage, which Flutter generates only from 3.41, so SwiftPM builds resolve on older Flutter versions too. - Nothing to change in your app. If your Podfile also adds the
BillDogFullpod itself, remove that line: the vendored framework and the pod conflict.
Changed — presentSurvey says why a survey was not shown #
- A survey the native SDK doesn't show resolves
presentSurveywithstatus: 'not_presented'and the newSurveyResult.reason, where it resolveddismissed. The reason isalready_presenting(another survey is open or loading; iOS and Android now show one at a time and leave the open one alone),disabled,consent,show_once,sampling,intercept,recurring,wait_period,display_conditions,not_eligible,no_presenter(iOS), or the server's own reason when it declined this user (e.g.audience_not_matched). Check fornot_presentedwherever you treatdismissedas "the user closed it".
Fixed — Play Billing in release builds (Android) #
- Flutter minifies Android release builds with R8, and the Android SDK then decided Play Billing was missing:
canMakePayments()answeredfalseand purchases made outside the app were not observed. The bundled Android SDK now finds Play Billing in minified builds.
Changed — package metadata #
- pub.dev topics:
in-app-purchase,subscriptions,paywall,monetization,analytics. Therepositorylink to a private repository is removed, andissue_trackerpoints at https://billdog.io/support.
1.1.1-beta.5 - 2026-11-03 #
Added — session replay #
BillDogSessionReplay.start({sampleRate, maskAllInputs, maskAllText, maskAllImages})/stop(),BillDogReplayRoot(wrap the app once) andBillDogReplayMask(always covered). The screen is captured and masked in Dart from the render tree — text, text fields (obscured ones always), images and marked subtrees — because the native recorders see one Flutter view; each frame is encoded and uploaded by the native SDK, under its opt-out,replayconsent, sampling, session and customer. The dashboard's Session Replay switch does not start it in a Flutter app.
Fixed: RevenueCat and Superwall bridges #
billdog_superwallcompiles again:superwallkit_flutter2.8.0, which^2.6.0resolves to, addedpurchaseFromGooglePlayWithReplacementtoPurchaseController, and the controllerimplementsthe class. It nowextendsit, as Superwall's docs show, and inherits that member's default body (it callspurchaseFromGooglePlay). Verified against 2.6.0 and 2.8.0.billdog_superwall:purchaseFromGooglePlay(productId, basePlanId, offerId)buys the base plan and offer Superwall's paywall selected, as the native Android controller does. They are passed as the Play product idproduct:basePlan[:offer], so native buys that base plan (the offer when Play lists it for the user, else the base plan itself). It used to drop both, and Play sold the product's first base plan.billdog_revenuecat(iOS): a RevenueCatgetOfferings()failure no longer fails the purchase. RevenueCat fails it whenever the project has no offerings, the usual case when BillDog owns the paywall, and offline. The product is then fetched by its id and bought as a store product, as the native iOS and Android integrations do; a package in the offerings is still preferred, so RevenueCat attributes its offering.
Round 3 platform parity #
BillDogOptions.customUrlScheme: the web-checkout return scheme, forwarded to native. Unset, native uses the app-specific<bundle id>.billdog/<applicationId>.billdoginstead of the sharedbilldog://.- Per-purpose consent (
setConsent(purpose, …),hasConsent(purpose)) goes through the native facade on both platforms, so it drops the kept placement answers as the blanket setters do. - Android: the
USE_EXACT_ALARMstrip stays (a no-op once billdog-notifications no longer declares it).
Fixed: the iOS APNs token never reached BillDog #
BillDogPush.requestPermission()asked iOS for the APNs token, but iOS hands it only to the application delegate, and the plugin had no hook there: nodevice_tokensrow was created, so no BillDog push reached an iOS app unless its developer wrote AppDelegate code (device-confirmed on an iPhone). The plugin is now an application delegate (addApplicationDelegate, as firebase_messaging and OneSignal capture it) and registers the token itself; firebase_messaging still receives it too. A token that arrives beforeconfigureis registered when configure runs, and an opted-in install asks iOS for its token again at every configure (the token can change). A failed registration is logged (usually: noaps-environmententitlement). Android is unchanged: pass the FCM token toBillDogPush.setDeviceToken.
Removed: public APIs that could never work #
BillDogVirtualCurrency.addCurrency/deductCurrency/grantCurrency/exchangeCurrency, withonBalanceChanged,onTransaction,VirtualCurrencyExchangeandVirtualCurrencyBalanceChange(only those calls fed them). Every wallet write needs the project's secret key; the server answers the app's publishable key 403 ("Public keys cannot make write operations"), so each call failed on every device. Virtual currencies are read-only in the client, as in RevenueCat's SDKs: credit and spend from your server (POST /v1/virtual-currency/transactionsor/adjustments), then read the balance withgetBalance. The native managers keep them deprecated, failing at once without a request.getBalance/getTransactionHistory(currencyId:)take a currency code ('COINS') as well as its id: the server resolves either (history with a code was a 500 before).
Native capabilities Dart could not reach #
Each goes through both plugins to the real native call.
- Subscription status is native's from launch:
BillDog.shared.subscriptionStatusreadunknownfor a whole session after a relaunch, because native sendsonSubscriptionStatusChangedonly on a change and a relaunch restores the same status it then fetches.configurenow seeds it with a native read;getSubscriptionStatus()reads native's current status on demand (and stores it);subscriptionStatusStreamgives the current status, then every change (Superwall parity). registerkeeps the no-paywall code: a placement with no paywall isPlacementError(NoPaywallConfiguredError)(wire codeNO_PAYWALL_CONFIGURED); it wasUnknownError.NoPaywallConfiguredErroris a newBillDogErrorsubclass: an exhaustiveswitchoverBillDogErrorneeds the case.registerPlacementstill reports it throughonSkipped.- Store:
BillDog.beginRefundRequest({productId, entitlementId})→RefundRequestStatus(Apple's refund sheet; Play's order history on Android),checkTrialOrIntroDiscountEligibility→IntroEligibilityper id,getStorefrontCountryCode(),getProducts(ids)(products outside an offering),purchaseConsumable(productId, quantity),purchaseCustom(CustomProduct)(a non-store product through yourPurchaseController),checkUserAccess({userId})→UserAccess,executeAction(...)(server-side paywall actions). - Attribution (RevenueCat parity):
setAttribution(map)and the named setters (setAdjustId,setAppsflyerId,setMixpanelDistinctID, ...setMediaSource,setCampaign,setAdGroup,setCreative,setPushToken), each to the native consent-gated setter;collectDeviceIdentifiers(). - Feedback:
captureFeedback(...),presentFeedbackWidget([options]). - Paywall:
onProductSelectionChange(componentId)stream. - Analytics:
BillDogAnalytics.isOptedOut(),getAnonymousId(),fetchAttribution(). - Experiments:
BillDogFeatureFlags.getVariant(experimentId)→ExperimentAssignment,setAttributes,trackConversion,trackImpression, and theonAssignmentChangedstream (the nativeab_variant_assigned). - Surveys:
armEventTriggeredSurveys(),prefetch(surveyId),flushOfflineQueue(),setEnabled(bool), and for a survey UI of your own:startSurvey,submitResponse(surveyId, [SurveyAnswer]),recordPartialResponse,abandonSurvey,dismissSurvey,trackSurveyEvent. - Push:
addOutcome/addUniqueOutcome,canRequestPermission(),getToken(),setOpensActionURLOnTap, local reminders (scheduleTrialReminders,scheduleRenewalReminder,scheduleExpiryReminderwith aReminderSubscription,cancelNotificationsForSubscription,cancelAllNotifications, which cancels BillDog's reminders only), the tray (getDeliveredNotifications,clearAllNotifications,removeNotification,removeGroupedNotifications), and theonPermissionChanged/onSubscriptionChangedstreams.
One status set, sign-in close, PaywallView.onOpenUrl on Android, iOS tap dedupe #
- Subscription status is the native wire set, as in React Native: a lapsed subscriber is now
SubscriptionStatus.expired(SubscriptionStatusType.expired, added last) and the delegate hearsexpired; it wasinactive.SubscriptionStatus.inactive/SubscriptionStatusType.inactivestay so existing code compiles, marked deprecated, and are never reported. Compare againstexpired; an exhaustiveswitchoverSubscriptionStatusTypeneeds the new case. PaywallPresentationHandler.onOAuthSuccess(info, signIn)— aregisterPlacementpaywall that closed after a verified sign-in made on it, with no purchase or restore. Called just beforeonDismiss, on iOS and Android (nativePaywallPresentationHandler.onOAuthSuccess). The handler heard it as a plain dismissal.PaywallView.onOpenUrlon Android — an "Open URL" tap and the Terms / Privacy links reach it (nativePaywallScreen(onOpenUrl)); it never fired on Android. On both platforms, aPaywallViewwithonOpenUrltakes the URL (the paywall does not open it), and one without it lets the paywall open it — on iOS the URL used to go to Dart regardless, so a view without the callback opened nothing.BillDogPush.notificationOpenedis safe for any tap on iOS too: a tap BillDog's delegate already recorded (including one firebase_messaging forwards to it) is not counted twice (native fix).
Following the native push, flags, status, error and wall sign-in fixes #
- Subscription status — the plugins pass the one native wire value
(
active | trial | gracePeriod | expired | notSubscribed | unknown) and Dart maps it once. A user who never subscribed is nowSubscriptionStatus.notSubscribed(SubscriptionStatusType.notSubscribed, added last) instead ofinactive. (A lapsed subscriber isexpiredsince the section above.) PlacementOAuthSuccesson Android — a full-screen wall that closes after a verified sign-in reports it on Android too (it wasPlacementDismissed).- Typed errors on iOS —
ProofInvalidError.proofandPurchaseOwnerConflictError.retryableare filled on iOS as on Android. getPresentationResulton Android — an error keeps its wire code, soPresentError.erroris the typed error.- Virtual currency on iOS — history rows carry
metadata, and the realtimestamp(native fix). - Push
- iOS: the plugin installs BillDog's notification delegate while the app launches (when no
other delegate is set), so the tap that cold-launches the app is recorded and delivered.
Opt out with the Info.plist Boolean
io.billdog.notifications.LAUNCH_HOOK=false. - Android: a tap that reaches the running app (
onNewIntent) is recorded and delivered; it was lost, becauseFlutterActivitydoes not callsetIntent. - Both: a tap that arrives before
onNotificationClickhas a listener is held and delivered to the first one.NotificationClick.notificationIdis BillDog's id on both platforms. - New
BillDogPush.getPermissionStatus()(PushPermissionStatus,notDeterminedon Android before the prompt) andBillDogPush.isOptedIn(). - New
BillDogOptions.autoSchedulesPurchaseReminders(defaultfalse, as natively): local renewal / expiry reminders after a purchase are now opt-in.
- iOS: the plugin installs BillDog's notification delegate while the app launches (when no
other delegate is set), so the tap that cold-launches the app is recorded and delivered.
Opt out with the Info.plist Boolean
BillDog.shared.canMakePayments({features})— App Store / Google Play availability (RevenueCat parity).- Removed bridge workarounds the native SDKs made unnecessary: the "no paywall configured"
message match, hand-mapped skip reasons, lowercased enum names (
wireValuenow), and the iOS notification-id fallback. Flags need no bridge-side fetch: the first read fetches natively.
Native parity (needs the native SDKs of this release) #
- Feature flags —
BillDogFeatureFlags.getFeatureFlag/getFeatureFlagVariant/getFeatureFlagPayload/getFeatureFlags/isReady/waitForFlags/reloadFeatureFlags, over the native A/B module, now registered at configure on both platforms (Android depends onbilldog-ab-test). The exposure ($feature_flag_called) is sent natively, never from Dart;BillDogOptions.sendFeatureFlagEventsturns it off. Registering the module also makes a survey gated on a flag follow the flag: without one the native presenter showed it to everyone. - Consent —
BillDog.setConsentRequired/setConsentGiven/setConsent(ConsentPurpose, …)/hasConsent/consentHeaderValue, the nativeConsentManager(React Native's surface). Callable beforeconfigure. On a consent-required project (EU by default) the server drops gated events that carry no consent envelope; a Flutter app could not send one. - Virtual currency —
BillDogVirtualCurrency(balance, all currencies, transaction history; the wallet writes were removed again later in this release, see Removed), the native manager registered at configure (Android depends onbilldog-virtual-currency). - Push —
BillDogPush.setDeviceToken(APNs hex / FCM token),requestPermission,optOut,notificationOpened(data)for taps another plugin received,onNotificationClick, andinstallNotificationCenterDelegate(iOS). The native notifications module is registered at configure (Android depends onbilldog-notifications, which records taps from the opened intent). - Exceptions —
BillDogAnalytics.captureException(error, stackTrace:)through the native exception capture, with the Dart type, message and stack; opt-inBillDogOptions.captureFlutterErrorschainsFlutterError.onErrorandPlatformDispatcher.onError(posthog-flutter's model). - Google Play plan change —
purchase(…, googleProductChangeInfo:)/purchasePackage(…, googleProductChangeInfo:)withGoogleProductChangeInfo(oldProductId, replacementMode:). Buying a sibling plan without it started a second Play subscription billing beside the first. Ignored on iOS (purchases_flutter parity).
Fixed (native parity) #
- Android: BillDog Auth was never configured — the first
signUp/requestCode/attempt/ passkey call crashed the app on an uninitialised base URL, and a hosted Facebook sign-in's session was dropped. The plugin now callsBillDogAuth.configureat configure, as the React Native bridge does. - iOS inline
PaywallViewRestore ran twice and an empty restore reached Dart asonRestore. The paywall now runs it once, shows "No Subscription Found" on the embedded paywall (native fix inPaywallViewController), andonRestoremeans a restore that gave access, as on Android. - Subscription status names —
BillDogDelegate.onSubscriptionStatusChangedhears the DartSubscriptionStatusTypename on both platforms (it wasactiveon iOS,ACTIVEon Android), and an expired subscriber is no longerunknown(it isexpired, see above). reset()/logOut()— the native SDKs now read and publish the new guest's customer info, socustomerInfoStream(andbilldog_superwall's status sync) stop showing the signed-out user's entitlements (RevenueCatlogOutparity).
Added #
integrations/billdog_revenuecat(unpublished,publish_to: none) — keep RevenueCat (purchases_flutter≥ 10.1) for purchases and use BillDog for paywalls and analytics, with the native integrations' behaviour:BillDogRevenueCat.configure(apiKey)registers aRevenueCatPurchaseController(purchases and restores through RevenueCat, StoreKit's transaction id as evidence on iOS, the Play order id on Android), sweeps the store on every RevenueCat customer-info update, and logs RevenueCat in and out with BillDog.billdog_flutterdoes not depend onpurchases_flutter.PurchaseController.setIdentity(String?)— called after native acceptsidentify/logIn/reset/logOut(the nativeBillDogPurchaseAdapter.setIdentity). Default: nothing; a throw is logged, never surfaced.BillDogInAppMessages.instance— dashboard in-app messages (Messaging → In-App), which a Flutter app could not show at all: neither plugin registered the native in-app module (Android did not even depend onbilldog-inappmessages), and the only in-app call,showInAppMessages, is Google Play's billing messages. Now:checkForMessages(trigger)(an "On Specific Event" event name, or a message id), the trigger store,setPaused, the queue, frequency-cap reset, suppression, and the click / click-result / will+did display / will+did dismiss callbacks as streams (native handlers are installed only while a stream is listened to). The message UI is the native SDK's. Same API shape as React Native'sInAppMessagesManager.
Changed #
BillDog.presentSurvey(id)completes when the survey closes, with how it ended: aSurveyResult(now exported) —completedwith the respondent and the submitted answers, or dismissed before Submit (completed: false,status: 'dismissed'). A survey that cannot be shown throws aPlatformExceptionwith codeSURVEY; Dart-only mode returns null. It used to complete at once with nothing — the native presenter was called with no handler — so an app could not tell a submitted survey from an abandoned one, or from one never shown. Code that awaits it now waits until the survey closes; don't await it if the next step should not wait. React Native'spresentSurveyresolves the same way.
Fixed #
- Android: surveys can be shown. The plugin did not depend on
io.billdog:billdog-survey-compose, which holds the survey UI, so everypresentSurveyfailed with "SurveyActivity not found" — and, with no handler to report it, nothing was shown and nothing was said.
Added #
BillDogSurveys.instance:listAvailableSurveys(),fetchSurvey(id)(typedSurveyDefinition→ pages → questions → choices, with the server'sshouldShow/reason),hasCompletedSurvey(id),registerEventTrigger(id, eventNames)andregisterEvent(name).presentSurveywas the only survey call this package had; the native SDKs and React Native had the rest. These throw on a missing plugin rather than reading as "no surveys".hasCompletedSurveyis the native SDKs' record, which they keep only forshow_oncesurveys.BillDog.setProxyURL(url, trustedForProofs: true)— an opted-in proxy also gets the customer proofs (the BillDog Auth session and the device key), so customer-scoped calls such asBillDogAuth.deleteAccount()work behind it instead of answeringProofRequiredError. Default false: unchanged. The proofs go to exactly the proxy's scheme, host and port, over https (plain http only to a loopback/private-network host in a DEBUG native build); re-setting the proxy without the flag, or clearing it, withdraws the trust. Both platforms need the native SDKs of the same release (iOSBillDogConfig.setProxyURL(_:trustedForProofs:), AndroidBillDog.setProxyURL(url, trustedForProofs)).BillDogAuth.hasStoredSession()— whether a refresh token is stored, with no network (the native SDKs' and React Native'shasStoredSession, Auth0canRenew()).isSignedIn()is false on a cold launch untilrestore()runs; this is the launch check that says a session is there to restore. Flutter had no way to tell "signed out" from "not restored yet".
Changed #
AuthAttemptResult.mfaToken/attempt(mfaToken:)docs: a FAILED second factor spends the challenge too (the server spends it before checking the code), so after a wrong or already-used code start again from the first factor.
Added #
BillDogAuth.account()andactiveSessions(), and the TOTP factor callsenrolTotp,confirmFactor,listFactors,removeFactorandregenerateBackupCodes— the native SDKs' account, session and second-factor API, which nothing in this package could reach: a Flutter app could not list its sessions or enrol a second factor. Each is proved natively with the stored refresh token, which still never reaches Dart. Works with the 1.1.1-beta.4 native SDKs.BillDog.setProxyURL(url)(RevenueCatPurchases.setProxyURL, the native SDKs' and React Native'ssetProxyURL): routes every edge-function call through a reverse proxy or a test backend. There was no way to point the Flutter SDK anywhere but production. Call it beforeconfigure; it throws when the plugin is missing rather than silently not applying.
Fixed #
purchasePackagebuys the package: the native SDK buys its own copy of it (RevenueCatpurchasePackage), attributed to the package's own offering and placement, with the promotional (iOS) or Play (Android) offer the dashboard pins on it. It bought the package's product by id, so when that product was in more than one offering (experiment arms, a seasonal or placement offering) the purchase was credited to the first loaded offering selling it, and on Android it took that offering's pinned Play offer, not the package's.Package.presentedOfferingContextcarries the offering, placement and experiment the native SDK stamped on the package. A package no longer loaded is bought by its product, still credited to its offering. Needs the native SDKs of the same release.billdog_superwall: a purchase is attributed to the BillDog offering behind the Superwall paywall on screen, whenSuperwallBillDogPurchaseController(offeringMap: …)names it (Superwall paywall identifier → BillDog offering identifier). The bridge learns which paywall is on screen from the events passed toforwardSuperwallEvent(paywallOpen/paywallClose). Without it a product sold in more than one offering was credited to the first loaded offering selling it. Any other purchase is attributed as before.BillDogGatewaygainsofferings()andpurchase'spresentedOfferingContext.BillDog.purchase(productId, presentedOfferingContext:)names the offering the purchase is attributed to, ahead of the first loaded offering selling the product;PresentedOfferingContextis exported. Needs the native SDKs of the same release (PurchaseParams.presentedOfferingContext).
Added (also in this release) #
BillDogDelegate.onPurchaseCancelled(productId): both plugins dropped the native SDK's cancel callback, so Dart never heard it.CustomerInfo.activeSubscriptionsandsubscriptionExpirationDates, which both native SDKs carry (RevenueCat'sactiveSubscriptions/allExpirationDates).
Fixed (also in this release) #
- Android: the inline
PaywallViewno longer crashes. AFlutterActivitygives the paywall's Compose view no lifecycle owner; the view now brings its own (released on dispose), and a Google sign-in that cannot be launched there answers an error instead of crashing. The inline view also forwardsonRestore. BillDogDelegate.onPaywallSkippedhears a skipped placement fromregister()andregisterPlacement()on both platforms, once per skip. It never reached a Flutter app fromregister().billdog_superwall: Superwall events forwarded withforwardSuperwallEventare recorded under Superwall's own names (superwall_paywall_open, …), as the native iOS and Android bridges do; they used the enum case (superwall_paywallOpen).billdog_superwall: a successful restore staysrestoredwhen the status sync after it fails (it turned intofailed), and a redeemed web checkout inhandleCustomPaywallAction/handleDeepLinkreturnstrueinstead of throwing. Purchase attribution sends the package's ownpresentedOfferingContext(placement, paywall, experiment, variant), not only the offering id.- iOS: the plugin no longer adds
lottie-ios. The SDK links its own Lottie, so apps carried two copies (158 "Class … is implemented in both" warnings at launch, with either copy running). - Picks up the native iOS and Android fixes in this release, among them: WebView paywalls render in
the WebView on iOS (they fell back to the native renderer, where a sign-in button does nothing);
Android reads the customer's access at launch (
subscriptionStatusstayedunknownin a Flutter app) and shows in-app messages, journey steps and event-triggered surveys; Android release builds minified with R8 on AGP 9 no longer crash at start;logOut()andreset()end and revoke a held BillDog Auth session; customer info refreshes right after a BillDog Auth sign-in; custom attributes are saved on the server; a paywall button's Purchase buys that button's product; Androidrestore()results carry their Play order id; push delivery, opens, action buttons and action URLs work; survey state (triggers,show_once, drafts, retry) works on Android; and the survey and in-app message fixes listed in the iOS and Android changelogs.
1.1.1-beta.4 - 2026-10-24 #
Added #
PaywallAlreadyPresentedError(wire codePAYWALL_ALREADY_PRESENTED). The iOS and Android SDKs now refuse a paywall asked for while another is on screen or still opening (a double tap on a button that callsregister), and nothing on screen changes; "Show Another Paywall" still opens on top.registerreturnsPlacementErrorwith this error, with the nativereasonon iOS. Both plugins used to report it as anUnknownError. Needs the native SDK release that includes the refusal.PaywallPresentationHandlergainsonPurchaseSuccess,onRestore,onLoadingStateChange,onFinishandonSkipped.onPurchaseSuccessreturns aPostPurchaseBehavior;keepOpenkeeps the paywall open. The plugin waits up to 2 seconds for the answer and closes the paywall without one. On Android the native SDK asks on the main thread, where Flutter also delivers Dart's answer, so the plugin does not wait there: the callback runs and the paywall closes.
Changed #
BillDogErroris sealed and has a new subtype,PaywallAlreadyPresentedError: aswitchoverBillDogErrorthat lists every subtype needs a case for it.
Fixed #
- iOS: the plugin compiles at its declared iOS 15 floor. 1.1.1-beta.3 fails to compile on iOS
for any app whose deployment target is below 16: it called the iOS 16 passkey deletion API
unguarded. On iOS 15
BillDogAuth.deletePasskey()now fails withpasskey_failed, as registering and signing in with a passkey already do. - The analytics overrides in
BillDogOptions—analyticsSessionTimeout,analyticsEnabled,analyticsFlushInterval,analyticsBatchSize,analyticsMaxQueueSize,analyticsSamplingRate— now reach the native SDK, which applies them over the dashboard's values (seconds for the interval and timeout, as documented). They were never passed to native, so none took effect. On Android the background analytics sync, which runs without your app's configure, now applies them too. registerPlacement'shandlerfollows the paywall live, through the native SDKs' presentation handler:onLoadingStateChange,onPresent,onPurchaseSuccess,onRestore,onDismissandonFinishfire as they happen.onSkip(and the newonSkipped, with the reason) fires when nothing is shown: no paywall configured, already entitled, or holdout.onErrorfires when the paywall could not be shown, and a refused second paywall's text namesPAYWALL_ALREADY_PRESENTED. Before, none of these was called, exceptonSkipwhen the native plugin was missing.registerstill reports no paywall as aPlacementError, as the native closure API does, and its result is unchanged.BillDogOptions.logLeveltakes effect: it reaches the native SDK, and the Dart logger follows it too. It was read nowhere, so onlyenableLoggingcounted. A set level overridesenableLogging(messages at that level and above), as natively. The plugin's own native messages go through the native logger too, so they follow the same settings.- Android:
BillDogOptions.localeOverridetakes effect. The Android SDK never applied a configured locale (see its changelog). A blanklocaleOverrideis no override. - A locale set with
setLocaleOverride()in an earlier launch reaches native paywalls and surveys atconfigure. It was restored in Dart only, so they showed another language than the onegetEffectiveLocale()reported. customerInfoStreamreceives every customer-info update the native SDK makes: a renewal, a refund or revoke, an Ask-to-Buy or Play pending purchase approved later, a purchase on a native paywall. It was fed only bygetCustomerInfo()calls made from Dart, so the app (and the Superwall integration) kept the old entitlements until its next read.logIn/identify(as another user) andlogOut/resetdrop the cachedCustomerInfo. A newcustomerInfoStreamlistener andentitlementsForProduct()used to get the previous user's info, and agetCustomerInfo()started before the switch could publish it after.
1.1.1-beta.3 - 2026-10-17 #
Fixed (from the iOS and Android SDKs) #
- A paywall product list bound to the offering shows every package, not only as many as it has authored cards; a one-time product's card shows no bare "/".
- Shadows and theme colours are drawn as designed (shadows drawn once on Android,
{value, unit}geometry read, inner shadows, theme tokens andhslalpha). - iOS: an app that only calls
configure()sends analytics, and a journey action is not delivered twice acrosslogIn.
Added #
BillDog.shared.preloadPaywalls(placementIds)andBillDog.shared.preloadAllPaywalls(), calling the native SDK's preload: each placement is resolved and its answer kept forregisterPlacement(which then presents at once and refreshes it in the background), its wall's images, fonts and renderer warmed. Neither was reachable from Flutter before.
1.0.2-beta.3 - 2026-10-03 #
Added #
- Purchase recording as store evidence (purchase-recording proposal r3.1 §6.4):
StoreEvidence(withfromInAppPurchase, which maps a StoreKit 1 restore to the original transaction id),PurchaseRecording,BillDog.recordPurchase,syncStorePurchases,purchaseRecordingIssues,storeAccountToken, andobservePurchaseResult(evidence:, transactionId:). PurchaseController.purchase(PurchaseRequest)andrestore(), defaulted to the per-store methods, returnPurchaseOutcome/RestoreOutcomewith the purchase's evidence.capabilitiesandstoreKitVersiondeclare what the controller can honour.
Changed (breaking) #
- The native forwarding controllers send the full purchase request (offer token, upgrade, quantity, the customer's store-account token) and carry the evidence back. Android used to send only the product id and a hardcoded store.
- A host purchase Dart does not answer within five minutes, or one in flight
when the engine detaches, is
Pending, not a failure or a hang. - A
PurchaseControllersubclass may no longer declare its own members namedpurchase,restore,capabilitiesorstoreKitVersion. - An embedded paywall's failed restore is reported as an error, not a restore (iOS).
OfferingResultcarries the placement as the server describes it:placementInfo(PlacementInfo),presentation(PlacementPresentation:gated,holdout,withheld,withheldReason),experiment(PlacementExperiment, withvariantName) andcampaign(PlacementCampaign), on every outcome.gated,placementId,experimentIdandvariantIdare read from them. The plugins used to send null for every display field, the variant name and the campaign.- Every failure a channel method reports is a typed
BillDogErrorcarrying the server's wire code:PlacementError.error,PresentError.error,RestoreFailed.error,WebCheckoutResult.failure,Failed.error;getCustomerInfo,getPaywall,identify,setUserAttributesandhasAccessForPlacementthrow one;BillDogAuth.deleteAccount()throwsReauthRequiredError/ProofRequiredError/ProofInvalidError.BillDogDelegate.onPurchaseFailedreceives aBillDogError, not a string. - A missing native plugin is a failure for
restorePurchases(RestoreFailed),register(PlacementError) andgetPresentationResult(PresentError); an empty native answer togetOfferingisOfferingFailed. These used to read as an empty restore, a dismissal, "no paywall" and "nothing configured". presentSurveyon an unconfigured SDK is an error, not a silent success.showInAppMessagesreturns whether they were shown (falseon iOS, which has no equivalent); it used to answer as if it had worked everywhere.setSandboxModeis removed: it was a no-op on both platforms (sandbox is decided by the API-key prefix).getOffering(placement)returns anOfferingResult(OfferingAvailable,OfferingHoldout,OfferingWithheld,OfferingNotConfigured,OfferingFailed) instead ofOffering?. A holdout, a withheld placement and a refusal are reported as themselves; no other offering is substituted.hasAccessForPlacementis asynchronous and asks the native SDK. It used to read a value nothing wrote, and answeredtruefor every placement.PurchaseController.restorePurchasesreturnsRestoreResult. The deprecatedRestorationResultalias is removed.- Headless paywall events carry no
paywall_id.placement_identifierholds the placement identifier;placement_idis sent only when the placement's server id is known.
Added #
getOfferings(): the project's default offering. No placement identifier is sent.purchase(productId),purchasePackage(package),purchaseViaWeb(productId)andcompleteWebCheckout(uri).BillDogAuth.deleteAccount().- Typed server refusals:
ProofRequiredError,ProofInvalidError(proof),ReauthRequiredError(maxAgeSeconds),AccessDeniedError(selector),PurchaseOwnerConflictError(retryable),PlacementAccessWithheldError,PlacementNotFoundError. BillDogDelegate.onWebCheckoutRedeemed(RedemptionOutcome): the nativeonDidRedeemLink, every outcome included (RedemptionRefusedcarries the server's typed refusal).integrations/billdog_superwall: an optional Superwall purchase controller backed by BillDog.
Fixed #
- Every
BillDogAuthandBillDogOrganizationscall threwMissingPluginException: Dart invoked them on thebilldogchannel while both plugins handle them onio.billdog.flutter/sdk. - iOS:
reset()tore the native SDK down (it called nativereset()); every call after a logout failed untilconfigureran again. It now calls nativelogOut(), as Android does.
Removed #
- The unused pigeon schema (
pigeons/billdog_api.dart) and thepigeondev-dependency. No generated code existed; the channels are hand-written. - The Dart journey action poller. It invoked
checkPendingActionsandcompleteAction, which neither plugin handled. The native SDKs fetch, execute and report journey actions themselves.
1.0.1-beta.2 #
Fixes iOS dependency resolution. The published podspec declared
s.dependency 'BillDog' — a pod that has never existed on the CocoaPods trunk —
so pod install failed with "Unable to find a specification for BillDog".
It now depends on BillDogFull (which the Swift sources already imported) with a
version floor naming the pre-release (>= 1.0.0-beta.2), since CocoaPods will not
select a pre-release for an unversioned or ~> requirement.
No Dart API or behaviour changes.
1.0.0-beta.2 #
Initial public beta. Thin bridge over the native BillDog iOS/Android SDKs, with
inline native paywall rendering via a PlatformView.
Added #
- Paywall presentation and inline native paywall view (
PaywallView). - Purchases: purchase, restore, and host-driven
PurchaseControllerbridge. - Identity:
logIn/logOut/identifywith attribute support and persistence acrossconfigure. - Analytics event tracking.
- Customer info stream, offerings, packages, entitlements, and subscription status models.
- Localization helpers, including CLDR-parity RTL locale detection.
- Delegate dispatch for paywall/purchase lifecycle callbacks.
- Hand-written
MethodChannelbridge (io.billdog.flutter/sdk) to the native SDKs. (This entry used to claim pigeon-generated channels; no pigeon output was ever generated or consumed, and the unused schema has been removed.)