Skip to content

"Switch must be exhaustive" warning, missing .unsupported cases #5310

@neave

Description

@neave

Describe the bug
Xcode shows “Switch must be exhaustive” in PurchasesError.swift getStoreKitErrorInfoIfAny and StoreKitError+Extensions.swift, even though @unknown default is present. They need the '.unsupported' case.

  1. Environment
    1. Platform:
    2. SDK version:
    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:
    5. Xcode version: 16.4
    6. Device and/or simulator:
      • Device
      • Simulator
    7. Environment:
      • Sandbox
      • TestFlight
      • Production
    8. How widespread is the issue. Percentage of devices affected.
  2. Debug logs
Switch must be exhaustive
  1. Steps to reproduce
    The compiler expects all enum cases to be explicitly handled, even with @unknown default.

  2. Other information
    May require replacing @unknown default

  3. Additional context
    Likely surfaced by stricter checks in recent Xcode versions or SDK updates.

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