I recently had an issue using the location plugin from F#, where the first location request would never return after granting permissions.
This can be found initially here
#288
then here
#314
The TL;DR is that I was accidentally using the plugin off the UI thread.
Permissions request must however be made on the UI thread as they need to show a dialog etc
My suggestion is either that
a.) permissions requests that come from background threads, either directly or via other plugins like location, throw an exception to alert the user that they are on the wrong thread
b.) alternatively those requests might be diverted to the main thread, and then continue on the original background thread after returning. Perhaps this could be done with some kind of combination of the main thread dispatch plugin and using ConfigureAwait on the TaskCompletionSource internally? I haven't thought it through that much.
I recently had an issue using the location plugin from F#, where the first location request would never return after granting permissions.
This can be found initially here
#288
then here
#314
The TL;DR is that I was accidentally using the plugin off the UI thread.
Permissions request must however be made on the UI thread as they need to show a dialog etc
My suggestion is either that
a.) permissions requests that come from background threads, either directly or via other plugins like location, throw an exception to alert the user that they are on the wrong thread
b.) alternatively those requests might be diverted to the main thread, and then continue on the original background thread after returning. Perhaps this could be done with some kind of combination of the main thread dispatch plugin and using ConfigureAwait on the TaskCompletionSource internally? I haven't thought it through that much.