WKWebView certificateChain in iOS 10

Hello!


I am attempting to access the certificate chain/certificate fingerprint within my WKWebView object but the certificateChain variable has been deprecated in iOS 10. XCode does not suggest a replacment to this deprecated variable, so I was curious if this functionality has been removed entirely? Is there any other way to access my WKWebView's certificate chain/certificate fingerprint? Thank you!

Check out the

serverTrust
property.

What’s interesting here is that the Objective-C header clearly points you at this:

@property (nonatomic, readonly, copy) NSArray *certificateChain
API_DEPRECATED_WITH_REPLACEMENT("serverTrust", macosx(10.11, 10.12), ios(9.0, 10.0));

but Xcode is not passing along that suggestion. That’s bugworthy IMO. Please file a bug about that and then post your bug number, just for the record

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"
WKWebView certificateChain in iOS 10
 
 
Q