Skip to content

[in_app_purchase][iOS] Unable to get VerificationResult value for StoreKit2 #164433

Closed

Description

@fushihara

Use case

The swift code for purchasing an item with StoreKit2 is as follows,
The app developer must reference the contents of the transaction variable.

// https://developer.apple.com/documentation/storekit/product/purchaseresult
let result = try await product.purchase()
switch result {
case .success(let verificationResult):
    switch verificationResult {
    case .verified(let transaction):
        // Give the user access to purchased content.
        ...
        // Complete the transaction after providing
        // the user access to the content.
        await transaction.finish()
        ...
    }
case .pending:
    // The purchase requires action from the customer. 
    // If the transaction completes, 
    // it's available through Transaction.updates.
    break
case .userCancelled:
    // The user canceled the purchase.
    break
@unknown default:
    break
}

Specifically I need the jwsRepresentation property of the transaction to see the purchase information on the app server.
The current in_app_purchase library does not have an interface to get it.
https://developer.apple.com/documentation/storekit/verificationresult/jwsrepresentation-21vgo
https://github.com/search?q=repo%3Aflutter%2Fpackages%20jwsRepresentation&type=code

For some reason it is only used in the restorePurchases method, but it is not possible to get the value of jwsRepresentation during a normal purchase.

Activity

  1. added
    in triagePresently being triaged by the triage team
    platform-iosiOS applications specifically
    packageflutter/packages repository. See also p: labels.
    team-iosOwned by iOS platform team
    and removed
    in triagePresently being triaged by the triage team
    on Mar 3, 2025
  2. cbracken commented on Mar 12, 2025

    @cbracken
    Member
  3. assigned and unassigned on Mar 12, 2025
  4. added
    P2Important issues not at the top of the work list
    triaged-iosTriaged by iOS platform team
    on Mar 12, 2025
  5. tirth-patel-nc commented on Jun 19, 2025

    @tirth-patel-nc
    Member

    this seems to be fixed by - flutter/packages#9280. can be closed.

  6. github-actions commented on Jul 29, 2025

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  7. locked as resolved and limited conversation to collaborators on Jul 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work listp: in_app_purchasePlugin for in-app purchasepackageflutter/packages repository. See also p: labels.platform-iosiOS applications specificallyr: fixedIssue is closed as already fixed in a newer versionteam-iosOwned by iOS platform teamtriaged-iosTriaged by iOS platform team

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions