Overview
- I’m attempting to put in writing a unit check case to purchase a storekit product.
SKTestSession.buyProduct(identifier: choices:)throws the errorStoreKit.StoreKitError.notEntitled
Testcase Code
@Check func instance() async throws {
let session = strive SKTestSession(configurationFileNamed: "VehicleStore")
session.disableDialogs = true
session.clearTransactions()
do {
let transaction = strive await session.buyProduct(identifier: "nonconsumable.automobile", choices: [])
print(transaction)
} catch {
// Throws StoreKit.StoreKitError.notEntitled
print("Error: (error)")
}
}
Storekit configuration file

Be aware
- In-App purchases functionality is added
- StoreKit configuration file is utilized in testcase
Surroundings:
- macOS 26.5.2 (25F84)
- Xcode 26.6 (17F113)

