adaptyteam / AdaptySDK-iOS

iOS SDK for growing mobile in-app purchases
https://docs.adapty.io/docs/quickstart
MIT License
368 stars 38 forks source link

Main Thread Checker fails on Adapty.getPaywalls call from other that main thread #5

Closed larryonoff closed 4 years ago

larryonoff commented 4 years ago

There's functions call-chain: Adapty.getPaywalls -> IAPManager.getPaywalls -> IAPManager.getPaywallsAndSyncProducts.

IAPManager.getPaywallsAndSyncProducts uses UIApplication under the hood. As result Adapty.getPaywalls call from other that main thread fails Main Thread Checker.

Expected behaviour: Adapty.getPaywalls can be called from any thread.

AKyashkin commented 4 years ago

@larryonoff hey, thanks for your feedback.

Fixed in https://github.com/adaptyteam/AdaptySDK-iOS/commit/fcfc5877d0e9752555a6e3e9d92f65a0da9e6be3 Will go live in the next couple of days.

larryonoff commented 4 years ago

@AKyashkin thanks! The fix looks perfect.

Skifcha commented 4 years ago

@larryonoff it's live now, available in 1.7.0