I am using the following code in my application.
string imageUrl = "https://imageUrl.png/"; //This is a valid url. I can see the image when I paste the url into my web browser
var url = new NSUrl(imageUrl);
using (CGImageSource source = CGImageSource.FromUrl(url))
{
if (source != null)
{
//I never get here
}
}
Why is source
always null? I've tried many different imageUrls
, all with the same result.
Your photo address seems to be HTTPS prefix.which is different from HTTP.You can try another URL be HTTP prefix.If the address must be HTTPS,I suggest you use some SDK.
or you can use the following code,they works when use http