airgap-it / beacon-ios-sdk

The beacon sdk allows iOS developers of dApps and wallets on Tezos to implement the wallet interaction standard tzip-10.
MIT License
8 stars 13 forks source link

[Feature Request]: Return callbacks to the main thread #18

Closed simonmcl closed 2 years ago

simonmcl commented 2 years ago

Most of the callbacks used are connected to a UI event, but all callbacks are returned on a background thread. I think the majority, if not all, should be bounced back to the main thread.

Examples:

jsamol commented 2 years ago

Thanks for the suggestion! We've taken some time to discuss it internally but eventually decided against proceeding with the changes. We don't want to force handling anything on the main thread if it doesn't have to be handled on the main thread. We're leaving the choice to the developer who has the context and a broader view of their actions and requirements.

We'll update the docs to make sure that it's always clear on what thread callbacks are executed, though.