Skip to content

[Billing Plans]: fix: Don't return products with billing plans on unsupported OS versions#6805

Merged
fire-at-will merged 4 commits into
billing-plans-devfrom
fix-dont-return-billingplanproducts-on-unsupported-os-versions
May 15, 2026
Merged

[Billing Plans]: fix: Don't return products with billing plans on unsupported OS versions#6805
fire-at-will merged 4 commits into
billing-plans-devfrom
fix-dont-return-billingplanproducts-on-unsupported-os-versions

Conversation

@fire-at-will

@fire-at-will fire-at-will commented May 15, 2026

Copy link
Copy Markdown
Contributor

Description

This fixes a bug where fetching a product with a billing plan (like com.rc.product:monthly) on iOS <26.4 would return the base product, but with a nil InstallmentsInfo. This is functionally equivalent to returning the same product twice.

The PR addresses this bug by:

  1. Not returning products with compound product IDs when running on iOS < 26.4
  2. Adding a log when we omit the product explaining why we don't return a product for it the request
  3. Adding a unit test to assert the behavior on iOS < 26.4

I'll follow up this PR with a similar change to assert that we don't return any products for compound product identifiers when running in SK1 mode.


Note

Medium Risk
Changes product fetching behavior by filtering out compound product identifiers with billing plans on iOS < 26.4, which could affect apps relying on prior (buggy) fallback behavior. Logic is gated by OS availability and covered by new unit tests, reducing regression risk.

Overview
Fixes SK2 product fetching so compound product identifiers that include billing plans (e.g. product:monthly) are ignored on OS versions where billing plans aren’t supported (< iOS 26.4), preventing the base product from being returned as an unintended fallback.

Adds a new warning log (sk2_billing_plans_are_unavailable_on_this_os_version) when these requests are omitted, and updates unit tests + availability helpers to validate both supported and unsupported OS behaviors.

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

@fire-at-will fire-at-will changed the base branch from main to billing-plans-dev May 15, 2026 16:40
@fire-at-will fire-at-will marked this pull request as ready for review May 15, 2026 16:47
@fire-at-will fire-at-will requested a review from a team as a code owner May 15, 2026 16:47

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ 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 561b46e. Configure here.

Comment thread Tests/StoreKitUnitTests/ProductsManagerTests.swift
@fire-at-will fire-at-will merged commit 3426923 into billing-plans-dev May 15, 2026
42 of 43 checks passed
@fire-at-will fire-at-will deleted the fix-dont-return-billingplanproducts-on-unsupported-os-versions branch May 15, 2026 17:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants