Skip to content

Add platform-specific PaywallPresentationConfiguration to purchases-capacitor-ui#730

Merged
tonidero merged 6 commits into
mainfrom
jeff/paywall-presentation-mode
Mar 18, 2026
Merged

Add platform-specific PaywallPresentationConfiguration to purchases-capacitor-ui#730
tonidero merged 6 commits into
mainfrom
jeff/paywall-presentation-mode

Conversation

@Jethro87

@Jethro87 Jethro87 commented Mar 17, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds a platform-specific PaywallPresentationConfiguration API to @revenuecat/purchases-capacitor-ui for controlling how paywalls are presented on each platform.

import { RevenueCatUI, PaywallPresentationConfiguration } from '@revenuecat/purchases-capacitor-ui';

// Convenience preset — full-screen on all platforms
await RevenueCatUI.presentPaywall({
  presentationConfiguration: PaywallPresentationConfiguration.FULL_SCREEN,
});

// Custom per-platform configuration
await RevenueCatUI.presentPaywall({
  presentationConfiguration: {
    ios: IOS_PAYWALL_PRESENTATION_STYLE.FULL_SCREEN,
    android: ANDROID_PAYWALL_PRESENTATION_STYLE.FULL_SCREEN,
  },
});

Changes

  • Added presentationConfiguration?: PaywallPresentationConfiguration to presentPaywall and presentPaywallIfNeeded
  • Added IOS_PAYWALL_PRESENTATION_STYLE and ANDROID_PAYWALL_PRESENTATION_STYLE as extensible const objects with string union types (not enums, to avoid breaking changes when adding new values)
  • Added PaywallPresentationConfiguration interface + FULL_SCREEN and DEFAULT convenience presets
  • JS layer validates the configuration and translates it to the native useFullScreenPresentation boolean before sending to the bridge
  • iOS Swift bridge reads useFullScreenPresentation directly
  • Updated API report, README, and example app
  • Added missing App.xcscheme for the example iOS project

Notes

  • Uses string union types + const objects instead of enums for extensibility — adding new presentation styles in the future won't be a breaking change for consumers
  • No changes needed in purchases-hybrid-common; the underlying iOS support already exists there
  • Default behavior: sheet on iOS, full-screen on Android

Jethro87 and others added 2 commits March 17, 2026 15:59
…nfiguration API

Adapts the paywall presentation API to match Unity's structured, platform-specific
approach using extensible const objects + string union types instead of enums.
Adds missing App.xcscheme for the example iOS project.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@tonidero tonidero changed the title Add iOS paywall presentationMode to purchases-capacitor-ui Add platform-specific PaywallPresentationConfiguration to purchases-capacitor-ui Mar 18, 2026
@tonidero tonidero marked this pull request as ready for review March 18, 2026 11:31
@tonidero tonidero requested a review from a team as a code owner March 18, 2026 11:31
@tonidero tonidero requested review from a team and vegaro March 18, 2026 11:31

@ajpallares ajpallares left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it makes sense! Just a couple of minor questions

Comment thread purchases-capacitor-ui/src/index.ts Outdated
@tonidero tonidero merged commit 3f6a725 into main Mar 18, 2026
9 checks passed
@tonidero tonidero deleted the jeff/paywall-presentation-mode branch March 18, 2026 12:53
import type { PurchasesPackage } from '@revenuecat/purchases-typescript-internal-esm';
import type { PurchasesStoreTransaction } from '@revenuecat/purchases-typescript-internal-esm';

// @public (undocumented)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we documment it?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah... Added in follow-up: #733

tonidero added a commit that referenced this pull request Mar 18, 2026
This was referenced Mar 18, 2026
facumenzella pushed a commit that referenced this pull request Mar 19, 2026
**This is an automatic release.**

## RevenueCat SDK
### ✨ New Features
* Add platform-specific PaywallPresentationConfiguration to
purchases-capacitor-ui (#730) via Jeffrey Bunn (@Jethro87)
* Add trackCustomPaywallImpression API with offeringId override (#725)
via Rick (@rickvdl)
### 📦 Dependency Updates
* [AUTOMATIC BUMP] Updates purchases-hybrid-common to 17.52.0 (#732) via
RevenueCat Git Bot (@RCGitBot)
* [Android
9.26.1](https://github.com/RevenueCat/purchases-android/releases/tag/9.26.1)
* [Android
9.26.0](https://github.com/RevenueCat/purchases-android/releases/tag/9.26.0)
* [iOS
5.65.0](https://github.com/RevenueCat/purchases-ios/releases/tag/5.65.0)
* [iOS
5.64.0](https://github.com/RevenueCat/purchases-ios/releases/tag/5.64.0)
* Updates purchases-hybrid-common to 17.51.1 (#729) via RevenueCat Git
Bot (@RCGitBot)
* [Android
9.26.1](https://github.com/RevenueCat/purchases-android/releases/tag/9.26.1)
* [Android
9.26.0](https://github.com/RevenueCat/purchases-android/releases/tag/9.26.0)
* [iOS
5.65.0](https://github.com/RevenueCat/purchases-ios/releases/tag/5.65.0)
* [iOS
5.64.0](https://github.com/RevenueCat/purchases-ios/releases/tag/5.64.0)
* [AUTOMATIC BUMP] Updates purchases-hybrid-common to 17.49.0 (#724) via
RevenueCat Git Bot (@RCGitBot)
* [Android
9.26.1](https://github.com/RevenueCat/purchases-android/releases/tag/9.26.1)
* [Android
9.26.0](https://github.com/RevenueCat/purchases-android/releases/tag/9.26.0)
* [iOS
5.65.0](https://github.com/RevenueCat/purchases-ios/releases/tag/5.65.0)
* [iOS
5.64.0](https://github.com/RevenueCat/purchases-ios/releases/tag/5.64.0)
* [AUTOMATIC BUMP] Updates purchases-hybrid-common to 17.48.0 (#722) via
RevenueCat Git Bot (@RCGitBot)
* [Android
9.26.1](https://github.com/RevenueCat/purchases-android/releases/tag/9.26.1)
* [Android
9.26.0](https://github.com/RevenueCat/purchases-android/releases/tag/9.26.0)
* [iOS
5.65.0](https://github.com/RevenueCat/purchases-ios/releases/tag/5.65.0)
* [iOS
5.64.0](https://github.com/RevenueCat/purchases-ios/releases/tag/5.64.0)

## RevenueCatUI SDK
### Paywallv2
#### ✨ New Features
* Add customVariables support to purchases-capacitor-ui (#734) via
Facundo Menzella (@facumenzella)

### 🔄 Other Changes
* Add docs for new Paywall presentation APIs (#733) via Toni Rico
(@tonidero)
* Bump fastlane-plugin-revenuecat_internal from `3e8c384` to `9a6911b`
(#731) via dependabot[bot] (@dependabot[bot])
* Add api-extractor for public API surface tracking (#723) via Rick
(@rickvdl)
* Bump fastlane-plugin-revenuecat_internal from `e146447` to `3e8c384`
(#726) via dependabot[bot] (@dependabot[bot])
* Add Galaxy to the README (#721) via Will Taylor (@fire-at-will)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants