Open tristan-warner-smith opened 3 months ago
👀 We've just linked this issue to our internal tracker and notified the team. Thank you for reporting, we're checking this out!
@tristan-warner-smith thanks for reporting! It does feel related to the bug that @joshdholtz's PR fixes, despite the console output, since we get the storefront through SK1 even if SK2 is enabled
@aboedo I've tried out @joshdholtz's PR and it did make a difference but unfortunately didn't go far enough. Here's where it's locking subsequently:
And here's a crash log we got with it: crashlog.txt
Describe the bug We're experiencing somewhat regular main thread hangs that appear to be related to
lock
usage in the SDK. Attaching images below.usesStoreKit2IfAvailable(true)
)Purchases.logLevel = .verbose
will help us debug this issue.Steps to reproduce, with a description of expected vs. actual behavior Swift UI project targeting iOS 16+. The SDK is configured within the scope of the App's init:
The SDK is initialised in a
Task
of the ViewModel's initialiser. The init is executed on theMainActor
as it's called from the App, so the SDK call toPurchases.configure(withAPIKey: apiKey, appUserID: nil)
will be using that parent scope.Other information (e.g. stacktraces, related issues, suggestions how to fix, links for us to have context, eg. stackoverflow, etc.) There's what could be related PR open although the console says
"Purchases is configured with StoreKit version 2"
Additional context Add any other context about the problem here.