Reputation: 9471
I am very new to Client/Server programming and networking in general. I am trying to connect to a server with my app using AFNetworking
. It is throwing an error:
the certificate for this server is invalid....
How do I get AFNetworking
framework to ignore this error and go ahead and load the data?
I am basically using the AFNetworking
example on Twitter as a springboard to integrate it into my application.
Upvotes: 3
Views: 2497
Reputation: 9185
Does the server in question have a self-signed SSL certificate by any chance?
If so, then you may find some useful information here:
The suggested approach is to define _AFNETWORKING_ALLOW_INVALID_SSL_CERTIFICATES_
in which cae you may have some success allowing AFNetworking to accept invalid SSL certificates. My experience has been hit or miss with this and the various other suggested ways of dealing with this - which often involve crashing on com.apple.NSURLConnectionLoader
in a background thread.
Upvotes: 2