Reputation: 676
I am using the Azure MobilServiceClient to call my custom controller and method and it just never returns. Using the same code in my Test project works just fine, but in my iOS app it just goes silent. Hanging the app.
I call it like this:
var parameters = new Dictionary<string, string> { { "loginProvider", loginProvider }, { "providerKey", providerKey } };
var result = await App.MobileService.InvokeApiAsync<AuthResult>("Auth", HttpMethod.Get, parameters);
I can look in the Azure Log Stream and see that the call is received as expected. Looking the same both from my test project and the App project. No errors.
What else can I try? Where else can I look?
I tried putting the same code piece into the sample code I can download from the Azure portal and it goes silent just like my own app.
Thanks
Upvotes: 0
Views: 582
Reputation: 676
Found the source of my problems: async deadlock.
I moved out my async api calls from the PCL app constructor and configured my calls with
.ConfigureAwait (false)
Upvotes: 1