NSDictionary *sslProperties = [[NSDictionary alloc] initWithObjectsAndKeys:
[NSNumber numberWithBool:YES], kCFStreamSSLAllowsExpiredCertificates,
[NSNumber numberWithBool:YES], kCFStreamSSLAllowsAnyRoot,
[NSNumber numberWithBool:NO], kCFStreamSSLValidatesCertificateChain,
kCFNull,kCFStreamSSLPeerName,
nil];
These keys are deprecated
kCFStreamSSLAllowsExpiredCertificates
kCFStreamSSLAllowsAnyRoot
How can I fix it so I'm not using deprecated API/keys.
I saw this 'kCFStreamSSLAllowsExpiredCertificates' and 'kCFStreamSSLAllowsAnyRoot' is deprecated
but I didn't understand the popular response
You should remove
kCFStreamSSLAllowsExpiredCertificates
andkCFStreamSSLAllowsAnyRoot
from yourNSDictionary
because it is not required anymore.