bizz84 / bizz84/SwiftyStoreKit
SwiftStoreKit.ReceiptError error 1
- 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
- [ ] Non-consumable
- [X ] Auto-Renewable Subscription
- [ ] Non-Renewing Subscription
### Environment
- [ X] Sandbox
- [X ] Production
### Version
0.13.3
## Report
### Issue summary
We're fetching the receipt in order to validate if the subscription is still valid or not. In order to do so we fetch the receipt and sent the encoded receipt to our server. This is our code:
```
SwiftyStoreKit.fetchReceipt(forceRefresh: false) { result in
switch result {
case .success(let receiptData):
let encryptedReceipt = receiptData.base64EncodedString(options: [])
Log.info("Fetch receipt success")
//further code to send the receipt to our server
case .error(let error):
observer.send(error: error.localizedDescription)
}
}
```
Everything works on my side but unfortunately the Apple reviewer gets the error which is shown in the section below. So `error.localizedDescription` is the alert message. Now I looked through the errors from SwiftStoreKit and I'm a bit hopeless cause I couldn't find any error with code 1. Could someone help me here?
### What did you expect to happen
Fetching receipt is successfull and the receipt will be send to our sever for validation without error
### What happened instead

Contributor guide
Assessment
This issue has not been assessed yet.