Forum Xamarin.Forms

Null reference exception when calling "webClient.DownloadFileTaskAsync" method from custom renderer

tutugeorgetutugeorge USMember ✭✭

I am trying to download an image url from my custom renderer class in Xamarin.iOS class.
When the below is called a Null reference exception is coming and going to App delegate class.

await webClient.DownloadFileTaskAsync (uri, filename);

Even when the above code is kept inside a try block, the exception is not being caught by the catch block

Any idea on how to solve this?

The url will give show an inmage if invokde through a browser.

Sign In or Register to comment.