purchases-ios: [macOS] Purchases.purchasePackage returns userCancelled == false when clicking on Cancel in Confirm Subscription popup
Common project specific issues
Describe the bug A clear and concise description of what the bug is. The more detail you can provide the faster our team will be able to triage and resolve the issue.
- Environment
- Platform: macOS
- SDK version: 10.15.6 (19G68)
- OS version: Big Sur - 11.0 Beta (20A5384c)
- Xcode version: 12.0.1
- How widespread is the issue. 100%
- Debug logs
<SKPaymentQueue: 0x6000015cd740>: Payment completed with error: Error Domain=ASDServerErrorDomain Code=5115 "The server encountered an error" UserInfo={NSLocalizedDescription=The server encountered an error} [Purchases] - DEBUG: PaymentQueue updatedTransaction: P1Y.mac_app_store_trial_1 (null) (Error Domain=SKErrorDomain Code=0 "UNKNOWN_ERROR" UserInfo={NSLocalizedDescription=UNKNOWN_ERROR, NSUnderlyingError=0x6000018cd260 {Error Domain=ASDServerErrorDomain Code=5115 "The server encountered an error" UserInfo={NSLocalizedDescription=The server encountered an error}}}) (null) - 2 [Purchases] - ERROR: There was a problem with the App Store.
- Steps to reproduce, with a description of expected vs. actual behavior
Steps to reproduce:
- Click on Cancel in either the Subscription Terms screen or Confirm Subscription screen


Expected outcome:
- Returns ‘userCancelled == true’
Actual:
- Returns
userCancelled == falseand error:

About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 2
- Comments: 18 (14 by maintainers)
Commits related to this issue
- macOS: improved ErrorCode.storeProblemError to indicate potential cancellation Workaround for #370. — committed to NachoSoto/purchases-ios by NachoSoto 3 years ago
- macOS: improved ErrorCode.storeProblemError to indicate potential cancellation (#943) Workaround for #370. — committed to RevenueCat/purchases-ios by NachoSoto 3 years ago
Should we close this for the time being? I will report back if Apple replies to my Feedback (LOL)
By the way I confirmed this only seems to affect
macOS.iOSdoes correctly result inErrorCode.purchaseCancelledError.