[Billing Plans]: Handle winback offer eligibility properly for products with billing plans#6845
Conversation
|
| Name | Version | Download | Change | Install | Change | Approval |
|---|---|---|---|---|---|---|
| RevenueCat com.revenuecat.PaywallsTester |
1.0 (1) | 18.1 MB | ⬆️ 54.8 kB (0.3%) | 64.9 MB | ⬆️ 208.8 kB (0.32%) | N/A |
| BinarySizeTest com.revenuecat.binary-size-test.local-source |
1.0 (1) | 4.1 MB | ⬆️ 22.3 kB (0.54%) | 12.4 MB | ⬆️ 49.5 kB (0.41%) | ⏳ Needs approval |
| BinarySizeTest com.revenuecat.binary-size-test.cocoapods |
1.0 (1) | 6.2 MB | ⬆️ 29.2 kB (0.47%) | 27.3 MB | ⬆️ 103.0 kB (0.38%) | ⏳ Needs approval |
| BinarySizeTest com.revenuecat.binary-size-test.spm |
1.0 (1) | 4.2 MB | ⬆️ 19.9 kB (0.47%) | 10.8 MB | ⬆️ 44.7 kB (0.42%) | ⏳ Needs approval |
RevenueCat 1.0 (1)
com.revenuecat.PaywallsTester
⚖️ Compare build
⏱️ Analyze build performance
Total install size change: ⬆️ 208.8 kB (0.32%)
Total download size change: ⬆️ 54.8 kB (0.3%)
Largest size changes
| Item | Install Size Change |
|---|---|
| DYLD.String Table | ⬆️ 78.1 kB |
| 📝 RCInstallmentsInfo.Objc Metadata | ⬆️ 8.8 kB |
| Code Signature | ⬆️ 5.7 kB |
| DYLD.Exports | ⬆️ 4.9 kB |
| RevenueCat.ProductsManager.ProductsManager | ⬆️ 3.7 kB |
BinarySizeTest 1.0 (1)
com.revenuecat.binary-size-test.local-source
⚖️ Compare build
📦 Install build
⏱️ Analyze build performance
Total install size change: ⬆️ 49.5 kB (0.41%)
Total download size change: ⬆️ 22.3 kB (0.54%)
Largest size changes
| Item | Install Size Change |
|---|---|
| DYLD.String Table | ⬆️ 3.3 kB |
| 📝 RevenueCat.WinBackOfferEligibilityCalculator.winbackOffersByID(fo... | ⬆️ 2.2 kB |
| 📝 RCInstallmentsInfo.Objc Metadata | ⬆️ 2.1 kB |
| DYLD.Exports | ⬆️ 1.8 kB |
| Code Signature | ⬆️ 1.5 kB |
BinarySizeTest 1.0 (1)
com.revenuecat.binary-size-test.cocoapods
⚖️ Compare build
📦 Install build
⏱️ Analyze build performance
Total install size change: ⬆️ 103.0 kB (0.38%)
Total download size change: ⬆️ 29.2 kB (0.47%)
Largest size changes
| Item | Install Size Change |
|---|---|
| DYLD.String Table | ⬆️ 37.5 kB |
| Code Signature | ⬆️ 2.4 kB |
| 📝 RevenueCat.WinBackOfferEligibilityCalculator.winbackOffersByID(fo... | ⬆️ 2.3 kB |
| 📝 RCInstallmentsInfo.Objc Metadata | ⬆️ 2.1 kB |
| DYLD.Exports | ⬆️ 1.8 kB |
BinarySizeTest 1.0 (1)
com.revenuecat.binary-size-test.spm
⚖️ Compare build
📦 Install build
⏱️ Analyze build performance
Total install size change: ⬆️ 44.7 kB (0.42%)
Total download size change: ⬆️ 19.9 kB (0.47%)
Largest size changes
| Item | Install Size Change |
|---|---|
| 📝 RevenueCat.WinBackOfferEligibilityCalculator.winbackOffersByID(fo... | ⬆️ 2.2 kB |
| 📝 RCInstallmentsInfo.Objc Metadata | ⬆️ 2.1 kB |
| DYLD.Exports | ⬆️ 1.8 kB |
| Swift.Sequence.compactMap | ⬇️ -1.4 kB |
| Code Signature | ⬆️ 1.2 kB |
🛸 Powered by Emerge Tools
Comment trigger: Size diff threshold of 100.00kB exceeded
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit e013643. Configure here.
JZDesign
left a comment
There was a problem hiding this comment.
Tests seem needed here…
* make the calculator testable * compilation fix + handle unknown ownershipType case * more compilation fixes * more compiler fixes * compile fix * more compilation fixes * update comments * add test





Description
Adds support for properly checking win-back offer eligibility for products with billing plans.
This is currently slated to merge into the
intro-offer-eligibilitybranch, but we'll switch it to merge intobilling-plans-devwhenintro-offer-eligibilityis merged into the dev branch.Testing
Manually tested with the purchase tester app
Note
Medium Risk
Changes which win-back offers are returned for billing-plan subscriptions (purchase/promo path), though behavior is guarded by OS/compiler availability and covered by new unit tests.
Overview
Refactors win-back offer eligibility so billing-plan products only surface offers tied to the product’s plan, and adds protocol-based adapters so the calculator logic can be unit tested without StoreKit.
On iOS 26.4+ (with a new enough compiler), eligible offer IDs from renewal info are intersected with win-back offers available on the product’s
billingPlanType(viapricingTerms), and the offer catalog now merges subscription-level win-backs with win-backs that exist only on specific pricing terms. StoreKit mapping lives in newWinBackEligibilityAdapters.swift;WinBackOfferEligibilityCalculatoroperates on internal protocols instead of calling StoreKit directly.Adds
WinBackOfferEligibilityCalculatorTestswith mocks covering empty/error paths, offer ordering, and billing-plan filtering.Reviewed by Cursor Bugbot for commit 3f0654f. Bugbot is set up for automated code reviews on this repo. Configure here.