Azure Mobile Service OAuth in Xamarin.iOS -
i creating xamarin native project ios , android. using microsoft azure backend , azure oauth authentication. added microsoft azure mobile client both ios , android project.
in xamarin.android project, did authentication azure following code:
mobileserviceclient client = new mobileserviceclient("my-azure-app-url"); var user = client.loginasync(this, mobileserviceauthenticationprovider.windowsazureactivedirectory);
above code works fine , able authentication.
same tried in xamain.ios can know initialisation of mobileserviceclient different in ios.
mobileserviceclient client = new mobileserviceclient("my-azure-app-url", httpmessagehandler);
i not able find httpmessagehandler. can 1 me solution
an http message handler responsible actual communication going on between client , server.
there default (managed) implementation used if not specify handler. go ahead , tell httpclient
use native 1 on ios (as android). use modernhttpclient or use xamarin studio configure use of nsurlsession
(on ios). highly recommend use native handler support ipv6 environments , increase performance.
in case, either omit handler parameter or use new system.net.http.httpmessagehandler()
.
if add modernhttpclient app, pass in new nativemessagehandler()
.
an example can found in repo azure offline syncing.
Comments
Post a Comment