Skip to content

[in_app_purchase] SKPaymentTransactionState deprecation warning #195980

Closed
flutter/packages
#13745

Description

@stuartmorgan

flutter/packages#13284, which would fix #194517, is currently blocked on an IAP warning:

iOS version:

/Volumes/Work/s/w/ir/cache/osx_sdk/xcode_17c52/XCode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator26.2.sdk/Developer/Library/Frameworks/StoreKitTest.framework/Headers/SKTestTransaction.h:34:32: error: 'SKPaymentTransactionState' is deprecated: first deprecated in iOS 18.0 - Use PurchaseResult from Product.purchase(confirmIn:options:).
32 | @property(nonatomic, readonly) NSDate *purchaseDate;
33 | 
34 | @property(nonatomic, readonly) SKPaymentTransactionState state;
   |                                `- error: 'SKPaymentTransactionState' is deprecated: first deprecated in iOS 18.0 - Use PurchaseResult from Product.purchase(confirmIn:options:).
35 | 
36 | @property(nonatomic, readonly) BOOL pendingPriceIncreaseConsent API_AVAILABLE(ios(15.4), macos(12.3), tvos(15.4), watchos(8.5), visionos(1.0)) NS_SWIFT_NAME(isPendingPriceIncreaseConsent);

macOS version:

/Volumes/Work/s/w/ir/cache/osx_sdk/xcode_17c52/XCode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Frameworks/StoreKitTest.framework/Headers/SKTestTransaction.h:34:32: error: 'SKPaymentTransactionState' is deprecated: first deprecated in macOS 15.0 - Use PurchaseResult from Product.purchase(confirmIn:options:).
32 | @property(nonatomic, readonly) NSDate *purchaseDate;
33 | 
34 | @property(nonatomic, readonly) SKPaymentTransactionState state;
   |                                `- error: 'SKPaymentTransactionState' is deprecated: first deprecated in macOS 15.0 - Use PurchaseResult from Product.purchase(confirmIn:options:).
35 | 
36 | @property(nonatomic, readonly) BOOL pendingPriceIncreaseConsent API_AVAILABLE(ios(15.4), macos(12.3), tvos(15.4), watchos(8.5), visionos(1.0)) NS_SWIFT_NAME(isPendingPriceIncreaseConsent);

It's not obvious from the log where this is triggering from, but I'm assuming it's this code.

Activity

  1. added
    p: in_app_purchase
    package
    team-ios
    on Nov 4, 2026
  2. added
    platform-ios
    platform-macos
    c: tech-debt
    fyi-macos
    on Nov 5, 2026
  3. cbracken commented on Nov 5, 2026

    @cbracken
    Member
  4. added
    triaged-macos
    on Nov 5, 2026
  5. added
    triaged-ios
    P1
    on Nov 5, 2026
  6. removed
    fyi-macos
    triaged-macos
    on Nov 5, 2026
  7. jmagman commented on Nov 20, 2026

    @jmagman
    Member

    It's not obvious from the log where this is triggering from, but I'm assuming it's this code.

    It's actually more surprising than this. Just calling import StoreKitTest is doing it, it's not coming from our code:

    
    SwiftExplicitDependencyGeneratePcm arm64 /Users/chrome-bot/Library/Developer/Xcode/DerivedData/ModuleCache.noindex/StoreKitTest-AP40BC2SNFW0VL0YC4XARNEM0.pcm
    <module-includes>:1:9: note: in file included from <module-includes>:1:
    1 | #import "Headers/StoreKitTest.h"
      |         `- note: in file included from <module-includes>:1:
    2 | 
    
    /Volumes/Work/s/w/ir/cache/osx_sdk/xcode_17c52/XCode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/Developer/Library/Frameworks/StoreKitTest.framework/Headers/StoreKitTest.h:14:9: note: in file included from /Volumes/Work/s/w/ir/cache/osx_sdk/xcode_17c52/XCode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/Developer/Library/Frameworks/StoreKitTest.framework/Headers/StoreKitTest.h:14:
    12 | #import <StoreKitTest/SKTestError.h>
    13 | #import <StoreKitTest/SKTestSession.h>
    14 | #import <StoreKitTest/SKTestTransaction.h>
       |         `- note: in file included from /Volumes/Work/s/w/ir/cache/osx_sdk/xcode_17c52/XCode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/Developer/Library/Frameworks/StoreKitTest.framework/Headers/StoreKitTest.h:14:
    15 | 
    16 | 
    

    https://logs.chromium.org/logs/flutter/buildbucket/cr-buildbucket/8664589460494951473/+/u/Run_package_tests/native_test/stdout

    SKTestTransaction header has a SKPaymentTransactionState property but isn't suppressing anything about it:

    @property(nonatomic, readonly) SKPaymentTransactionState state;

    Not sure what to do except skip -Wno-error=deprecated-declarations in the test project targets. I don't think there's a way to suppress it around the import itself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P1c: tech-debtp: in_app_purchasepackageplatform-iosplatform-macosteam-iostriaged-ios

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions