Closed v-andreipetrea closed 1 month ago
Hello thanks for reporting it. You are going to take a look, we keep you posted cc @github-richard-depierre
Hi @v-andreipetrea,
According to the documentation, the “willPresentModalView” event is not called in the main thread. It’s expected behavior as stated in the Teads SDK documentation. However, triggering the Main Thread Checker warning can indeed indicate an issue that needs addressing.
We can’t seem to be able to reproduce this error in the sample app. If possible, could you provide a fork of the sample app with the issue? This would help us investigate and provide more targeted assistance.
If you need further assistance or clarification on how to handle this, feel free to ask!
Hi @github-richard-depierre,
Sure, I just created a fork, here's the branch I pushed: https://github.com/v-andreipetrea/TeadsSDK-iOS/tree/main-thread-issue-on-ad-click-inread-direct-tableview
I just modified the willPresentModalView return value to be nil for InReadDirect scrollView and tableView implementation to show the main thread issue appeared on ad click/tap.
Please let me know your thoughts on this and if you manage to reproduce the issue.
Thanks!
Hi @github-richard-depierre, did you get the chance to look into this?
Hi @v-andreipetrea,
I apologize for the delay in getting back to you. We will look into this issue very soon and I will give you an ETA as soon as we have more information.
Hi @v-andreipetrea this issue seems to be fixed in the latest release 5.1.6 please tell me if this has fixed your issue.
Hi @github-richard-depierre , I confirm that the issue is fixed in the 5.1.6 release.
"willPresentModalView" is called now on the Main Thread, so no more Main Thread checker errors.
Thanks!
Hi @github-lucas-bon,
Is it expected to call "willPresentModalView" on a background thread? Normally, at this point, the application or the SDK tries to determine which is the current top most UIViewController. In the example below I will return nil on the "willPresentModalView" callback and the Main Thread Checker is triggered. It's reproducible on the latest Teads SDK v5.1.3 after tapping on a video ad.
Could you please look into this and try to resolve the main thread warning?