Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SDWebImage without ssl certificate

I try to set image via SDWebImage. But SDWebImage cancel operation. I've tried to get this image in Safari with url and Safari asked me about certificate. When I cancel dialog window I get this image.

Question is: Can I disable SDWebImage certificate validation without modifying this library?

like image 312
Severyn Katolyk Avatar asked Jan 29 '23 05:01

Severyn Katolyk


1 Answers

Use

UIImageView_name.sd_setImage(with: URL(string: logo), placeholderImage: nil, options: .allowInvalidSSLCertificates)

Instead of

UIImageView_name.sd_setImage(with: URL(string: logo))
            UIImageView_name

For UIButton use

UIButton_name.sd_setImage(with: URL(string: customer.getProfilePic()), for: .normal, placeholderImage: nil, options: .allowInvalidSSLCertificates, completed: nil)
like image 159
Thushara Avatar answered Feb 08 '23 06:02

Thushara