Skip to content

Newer sandbox non-subscription purchase takes precedence over older production purchase #5301

@danielpunkass

Description

@danielpunkass
  1. Environment

    1. Platform: iOS
    2. SDK version: main branch
    3. StoreKit version:
      • StoreKit 1 (default on versions <5.0.0. Can be enabled in versions >=5.0.0 with .with(storeKitVersion: .storeKit1))
      • StoreKit 2 (default on versions >=5.0.0)
    4. OS version: n/a
    5. Xcode version: n/a
    6. Device and/or simulator:
      • Device
      • [] Simulator (not an issue because the sandbox value is respected)
    7. Environment:
      • Sandbox
      • TestFlight
      • Production
    8. How widespread: I believe the problem would affect any customers who have purchased a production non-subscription SKU and then for whatever reason purchased the same SKU again in TestFlight.
  2. Ask if really needed but I don't think you'll need them.

  3. Steps to reproduce, with a description of expected vs. actual behavior

    1. Arrange for a customer to have two purchases of the same non-subscription item. One, in production, should be dated earlier than one in sandbox.
    2. In code, request the latest customer info.
    3. Examine the CustomerInfoResponse.Subscriber.allPurchasesByID and see that the only non-subscription purchase represented in the list is from the sandbox.
  4. In this scenario, the entitlements.activeInCurrentEnvironment value ends up not listing the entitlement corresponding to the production purchase, presumably because it was stripped in the process of building the entitlements array.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions