Skip to content

[Billing Plans]: Fix: Dont return products for compound product IDs when in SK1 Mode#6806

Merged
fire-at-will merged 8 commits into
billing-plans-devfrom
dont-return-products-for-compound-product-ids-for-sk1
May 19, 2026
Merged

[Billing Plans]: Fix: Dont return products for compound product IDs when in SK1 Mode#6806
fire-at-will merged 8 commits into
billing-plans-devfrom
dont-return-products-for-compound-product-ids-for-sk1

Conversation

@fire-at-will

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

Copy link
Copy Markdown
Contributor

Description

This PR fixes a bug where requesting a product with a compound product ID, like com.rc.product:monthly, when running the SDK in StoreKit 1 mode, would return a StoreProduct with no InstallmentsInfo object. This is incorrect behavior and could result in you getting back the same product twice if you requested both com.rc.product:monthly and com.rc.product.

This PR fixes this by:

  • Not returning any products for compound product identifiers when running in SK1 mode
  • Adds a warning log for it

Note

Medium Risk
Changes product identifier normalization and filtering so compound billing-plan IDs are ignored in StoreKit 1, which can alter which products are returned and which requests are made.

Overview
Fixes product fetching so compound product identifiers with billing plans (e.g. com.app.sub:monthly) are never returned or requested when running in StoreKit 1, preventing duplicate/incorrect StoreProduct results.

Adds a new warning log sk1_does_not_support_billing_plans and centralizes billing-plan support checks in ProductsManager.areProductsWithBillingPlansSupported (SK2 + OS availability), with updated/expanded unit tests to assert the correct empty results and warning behavior across OS versions and StoreKit modes.

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

@fire-at-will fire-at-will requested a review from a team as a code owner May 15, 2026 20:23
@fire-at-will fire-at-will changed the base branch from main to billing-plans-dev May 15, 2026 20:23
Comment thread Tests/StoreKitUnitTests/ProductsManagerTests.swift Outdated

@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 24d5f0d. Configure here.

Comment thread Tests/StoreKitUnitTests/ProductsManagerTests.swift
@fire-at-will fire-at-will merged commit 7d0afe1 into billing-plans-dev May 19, 2026
42 of 43 checks passed
@fire-at-will fire-at-will deleted the dont-return-products-for-compound-product-ids-for-sk1 branch May 19, 2026 13:28
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