Skip to main content
Question

iOS - Entitlements when unit test

  • Feb 21, 2024 2:12 PM UTC
  • 0 replies
  • 339 views

Forum|alt.badge.img+3

I want to automate my revenuecat process. I test using StoreKit, but entitlements are not reset. How do I achieve this?
 

let session = try? SKTestSession(configurationFileNamed: "storekitconfig")
session?.resetToDefaultState()
session?.disableDialogs = true
session?.clearTransactions()
customerInfo.entitlements["Pro"]?.isActive == true

This code returns true. How do I make it return true if I just made a purchase?

This post has been closed for comments