[iOS] Handle Apple NSUnderlyingError instead of failing on GeneralError when Terms & Conditions have changed #382
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
For iOS only: Handle Apple NSUnderlyingError instead of failing on GeneralError when Terms & Conditions have changed
This message is shown when you enable 'interrupt purchases' in the Sandbox users on App Store Connect. When placing the purchase, PurchaseAsync is called and it returns a GeneralError. What actually is happening is Apple is refusing the payment to be made until the user accepts the updated Terms of Service.
To reproduce, please visit App Store Connect and navigate to the 'Users and Access' section. In the side menu, click Testers under Sandbox. Click or create a user and tick the box 'Interrupt purchases'. Log in and out of your Sandbox account from the iOS device and try to make a purchase. After pressing the blue 'Buy' button you will get this popup.
Fixes issue where the plugin returned invalid status for the payment. An app I submitted was denied for having shown an error message for this.
Changes Proposed in this pull request:
Please tell me if I can make any corrections to my change or other ways of handling this are known.
A report on Apple forums: https://developer.apple.com/forums/thread/674081