bizz84 / bizz84/SwiftyStoreKit

SwiftStoreKit.ReceiptError error 1

Open
#392 32 comments 1 reaction 0 assignees View on GitHub
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
screen shot 2018-08-02 at 11 24 36

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.