SKProductsRequest fails in Xcode version 12.1 in SKTestSession

Viewed 445

When I run SKProductsRequest from the unit tests, I get this error:

Error Domain=SKErrorDomain Code=0 "UNKNOWN_ERROR" UserInfo={NSLocalizedDescription=UNKNOWN_ERROR, NSUnderlyingError=0x7f9b514849e0 {Error Domain=ASDErrorDomain Code=950 "Unhandled exception" UserInfo={NSLocalizedDescription=Unhandled exception, NSLocalizedFailureReason=An unknown error occurred}}}

Test

let session = try SKTestSession(configurationFileNamed: "Configuration") 
session.disableDialogs = true 
buyProduct()

In buyProduct() performed

let request = SKProductsRequest(productIdentifiers: ids) 
request.delegate = self request.start()

In delegate method func request(_ request: SKRequest, didFailWithError error: Error) I get an error

0 Answers
Related