bizz84 / bizz84/SwiftyStoreKit
Success after user cancels the purchase
- Dominant language
- Swift
- Stars
- 6.7k
- Forks
- 801
- PR merge metrics
- No merged PRs in 30d
Description
### Platform
- [X] iOS
- [ ] macOS
- [ ] tvOS
### In app purchase type
- [ ] Consumable
- [x] Non-consumable
- [ ] Auto-Renewable Subscription
- [ ] Non-Renewing Subscription
### Environment
- [ ] Sandbox
- [X] Production
### Version
0.13.2
### Related issues
https://github.com/bizz84/SwiftyStoreKit/issues/168
## Report
### Issue summary
When the popup with TouchID appears (where user is supposed to confirm his IAP), if user cancels the purchase, SwiftyStoreKit.purchaseProduct still returns .success, which allows user to get IAP content without actually paying for it.
I know it sounds weird, but here's the video proof: https://youtu.be/upWTCLULM_8
Here's the screenshot of my code: https://imgur.com/a/ffkoWeZ
The UIAlertController, that appeared on the video after canceling the IAP, is declared on 224 line, which is inside .success case.
### What did you expect to happen
IAP is supposed to be cancelled
### What happened instead
IAP cancels, but the content is still given to user
Contributor guide
Assessment
This issue has not been assessed yet.