Skip to content

Make Offering.PaywallComponents and paywallComponents public#6742

Merged
ajpallares merged 5 commits into
mainfrom
pallares/paywall-components-public
May 13, 2026
Merged

Make Offering.PaywallComponents and paywallComponents public#6742
ajpallares merged 5 commits into
mainfrom
pallares/paywall-components-public

Conversation

@ajpallares
Copy link
Copy Markdown
Member

@ajpallares ajpallares commented May 7, 2026

Description

Removes the @_spi(Internal) marker from the Offering.PaywallComponents struct, the Offering.paywallComponents property, and the convenience initializer that accepts paywall components.

The internal-only details of PaywallComponents (its stored uiConfig/data properties and its initializer) remain @_spi(Internal) since they expose types (UIConfig, PaywallComponentsData) that are still SPI.

Motivation

Today, consumers of the SDK can read every property of an Offering except paywallComponents, which is hidden behind @_spi(Internal). This means there is no way to take an existing Offering and recreate it without losing the paywall components data.

By exposing the PaywallComponents type and the paywallComponents property as public (while keeping their internals SPI), callers can read paywallComponents from an existing Offering and pass it back into the public initializer, enabling lossless re-creation of an Offering value.


Note

Low Risk
Low risk: this is a Swift API visibility change (SPI → public) with no behavioral logic changes, but it does expand the public surface area and ABI for Offering.

Overview
Makes Offering.PaywallComponents, Offering.paywallComponents, and the convenience Offering initializer that accepts paywallComponents public by removing @_spi(Internal), while keeping PaywallComponents’ stored properties and initializer SPI-only.

Updates API tests and generated .swiftinterface files to reflect the newly public symbol, initializer, and Sendable conformance.

Reviewed by Cursor Bugbot for commit f8d48ea. Bugbot is set up for automated code reviews on this repo. Configure here.

Removes the `@_spi(Internal)` marker from the `Offering.PaywallComponents`
struct, the `Offering.paywallComponents` property, and the convenience
initializer that accepts paywall components. The internal-only details of
`PaywallComponents` (its stored properties and initializer) remain
`@_spi(Internal)` since they expose types that are still SPI.

This allows external consumers to read `paywallComponents` from an existing
`Offering` and pass it back into a new `Offering`, enabling lossless
re-creation of an `Offering` value.

Also extends the Swift API tester to cover the newly public surface.

Co-authored-by: Cursor <cursoragent@cursor.com>
@ajpallares ajpallares marked this pull request as ready for review May 7, 2026 16:02
@ajpallares ajpallares requested review from a team as code owners May 7, 2026 16:02
@ajpallares ajpallares enabled auto-merge (squash) May 13, 2026 11:41
@ajpallares ajpallares merged commit f80647f into main May 13, 2026
17 of 19 checks passed
@ajpallares ajpallares deleted the pallares/paywall-components-public branch May 13, 2026 11:51
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.

3 participants