Restore Old Package & Offering Initializer APIs
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.
📸 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
@RCGitBot please test