Are SKProductsRequestDelegate methods always called on the main thread?

Viewed 583

In iOS 13 I've received a few crash reports that appear to be a result of performing UI work on a different thread than the main thread after receiving productsRequest(_:didReceive:) and request(_:didFailWithError:). The documentation does not state which thread these are called on but I believe it has always been the main queue. Are they being called from a different queue now?

1 Answers

I confirmed with iOS 13.1.2 that they can indeed be called from a different queue: com.apple.root.default-qos (concurrent). Eek.

The solution is to dispatch that work back to the main thread via DispatchQueue.main.async.

Related