bizz84 / bizz84/SwiftyStoreKit
App store receipt request always fails
- Dominant language
- Swift
- Stars
- 6.7k
- Forks
- 801
- PR merge metrics
- No merged PRs in 30d
Description
I am performing this:
```
let appleValidator = AppleReceiptValidator(service: .production, sharedSecret: "xxxxxxxxxxxx")
SwiftyStoreKit.verifyReceipt(using: appleValidator, forceRefresh: true) { result in
switch result {
case .success(let receipt):
print("success: \(receipt)")
case .error(let error):
print("Verify receipt failed: \(error)")
}
}
```
Getting the **sharedSecret** key from the AppStore Connect portal under my app -> in app purchase -> secret key
I tried to use ._production_ and ._sandbox_ **service** but I always go into failure "case .error" with this message:
`Verify receipt failed: networkError(error: Error Domain=SKErrorDomain Code=0 "An unknown error occurred" UserInfo={NSLocalizedDescription=An unknown error occurred, NSUnderlyingError=0x28182ba20 {Error Domain=ASDServerErrorDomain Code=500317 "Unhandled exception" UserInfo={NSLocalizedDescription=Unhandled exception, NSLocalizedFailureReason=An unknown error occurred}}})`
Any solution?
Contributor guide
Assessment
This issue has not been assessed yet.