2
0

Ensure updates happen on main thread.

This commit is contained in:
Maarten Billemont 2020-01-16 16:20:16 -05:00
parent dacdf25fe8
commit 14387a2310

View File

@ -149,8 +149,10 @@ PearlAssociatedObjectProperty( NSMutableArray*, ProductObservers, productObserve
products[product.productIdentifier] = product;
self.products = products;
for (id<MPInAppDelegate> productObserver in self.productObservers)
[productObserver updateWithProducts:self.products transactions:[self transactions]];
PearlMainQueue( ^{
for (id<MPInAppDelegate> productObserver in self.productObservers)
[productObserver updateWithProducts:self.products transactions:[self transactions]];
} );
}
- (void)request:(SKRequest *)request didFailWithError:(NSError *)error {