We are doing a Swift Package to manage our iap with storekit 2.
This packages also contains the unit tests for the code.
(as well as all the required files .storekit, certificate, ...)
when calling SKTestSession.buyProduct(identifier: options:) we catch an error : Error Domain=SKErrorDomain Code=0 "(null)"
Note when trying exactly the same code but in a project instead of a package that works perfectly.
Any idea what could it be?
The code is really simple :
var testSession: SKTestSession!
override func setUpWithError() throws {
testSession = try SKTestSession(configurationFileNamed: "Products")
}
func testExample() async throws {
do {
let productID = "nonConsumable.crystal.tier1"
try await testSession.buyProduct(identifier: productID)
} catch {
XCTFail("An error occured during purchase : \(error)")
}
}
}
Post
Replies
Boosts
Views
Activity
Hi everyone.
I noticed that applicationIconBadgeNumber is now deprecated, if there is a new way to set this badge number with setBadgeCount(_:withCompletionHandler:) i don't see any new way to get the current value.
Does anyone know how to get the current value?
thanks