purchases-ios icon indicating copy to clipboard operation
purchases-ios copied to clipboard

Restore Old Package & Offering Initializer APIs

Open fire-at-will opened this issue 5 months ago • 2 comments

Context

In release 5.23.0, we unintentionally broke the public API for the Offering and Package initializers by adding a non-optional webCheckoutUrl: URL? parameter.

The breaking changes were introduced in the these PRs/commits:

  • https://github.com/RevenueCat/purchases-ios/pull/5049
  • https://github.com/RevenueCat/purchases-ios/pull/5062/commits/5ff1c6fbf48b71c480ce18717750b780a1e30729

Description

This PR restores the previous API by re-introducing new public initializers for these structs that omit the webCheckoutUrl parameter, matching the API contracts prior to 5.23.0. It also adds these re-introduced constructors to the API testers.

This PR introduces entirely new convenience initializers rather than adding a default value of nil to the existing ones, because initializers with default parameter values aren’t exposed to Objective-C. Simply adding a default would not restore the original Objective-C API.

fire-at-will avatar Aug 13 '25 15:08 fire-at-will

📸 Snapshot Test

1 modified, 704 unchanged

Name Added Removed Modified Renamed Unchanged Errored Approval
RevenueCat
com.revenuecat.PaywallsTester.mac-catalyst-optimized-for-mac
0 0 0 0 235 0 N/A
RevenueCat
com.revenuecat.PaywallsTester.mac-catalyst-scaled-to-match-ipad
0 0 1 0 234 0 ✅ Approved
RevenueCat
com.revenuecat.PaywallsTester
0 0 0 0 235 0 N/A

:flying_saucer: Powered by Emerge Tools

emerge-tools[bot] avatar Aug 13 '25 16:08 emerge-tools[bot]

@RCGitBot please test

fire-at-will avatar Aug 13 '25 16:08 fire-at-will