Solved

Purchase was cancelled - iOS 16 iPhone 14 Pro simulator

  • 31 October 2022
  • 2 replies
  • 341 views

Badge +1

Hi there,

 

May you please assist.

 

Im am using purchases_flutter: ^4.3.1

 

❯ flutter --version
Flutter 3.3.6 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 6928314d50 (6 days ago) • 2022-10-25 16:34:41 -0400
Engine • revision 3ad69d7be3
Tools • Dart 2.18.2 • DevTools 2.15.0

 

The issue is -

After filling in apple id + password

Clicking on either ‘Cancel’ or ‘Ok’

 

 

I always get the error below

 

PlatformException(1, Purchase was cancelled., {userCancelled: true, code: 1, message: Purchase was cancelled., underlyingErrorMessage: , readableErrorCode: PURCHASE_CANCELLED, readable_error_code: PURCHASE_CANCELLED}, null)

 

I am OKAY with getting the exception when user clicks cancel, but I don’t understand why I get the error when user clicks OK

 

 

Please note: Android implementation working fine. Only iOS affected

Also all offerings displayed on screenshot below are coming from RevenueCat without any issues.

 

 

 

 

icon

Best answer by cody 10 November 2022, 22:40

View original

2 replies

Badge +3

I am facing the same issue on the simulator. On device it works fine though. Not sure if IAPs are supposed to work on the simulator.

Userlevel 6
Badge +8

Hey @Koketso!

IAP’s won’t work in the simulator unless you’re using StoreKit configuration files: https://www.revenuecat.com/docs/apple-app-store#ios-14-only-testing-on-the-simulator

 

Are you seeing this issue on real devices, too?

Reply