Make Offering.PaywallComponents and paywallComponents public#6742
Merged
Conversation
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>
JZDesign
approved these changes
May 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Removes the
@_spi(Internal)marker from theOffering.PaywallComponentsstruct, theOffering.paywallComponentsproperty, and the convenience initializer that accepts paywall components.The internal-only details of
PaywallComponents(its storeduiConfig/dataproperties 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
OfferingexceptpaywallComponents, which is hidden behind@_spi(Internal). This means there is no way to take an existingOfferingand recreate it without losing the paywall components data.By exposing the
PaywallComponentstype and thepaywallComponentsproperty as public (while keeping their internals SPI), callers can readpaywallComponentsfrom an existingOfferingand pass it back into the public initializer, enabling lossless re-creation of anOfferingvalue.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 convenienceOfferinginitializer that acceptspaywallComponentspublic by removing@_spi(Internal), while keepingPaywallComponents’ stored properties and initializer SPI-only.Updates API tests and generated
.swiftinterfacefiles to reflect the newly public symbol, initializer, andSendableconformance.Reviewed by Cursor Bugbot for commit f8d48ea. Bugbot is set up for automated code reviews on this repo. Configure here.