Skip to main content
Answer

Purchase was cancelled - iOS 16 iPhone 14 Pro simulator

  • October 31, 2022
  • 2 replies
  • 1060 views

Forum|alt.badge.img+3

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.

 

 

 

 

Best answer by cody

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?

This post has been closed for comments

2 replies

Forum|alt.badge.img+3
  • New Member
  • November 8, 2022

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.


cody
RevenueCat Staff
Forum|alt.badge.img+8
  • RevenueCat Staff
  • Answer
  • November 10, 2022

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?