Sample code for 30+ languages & platforms
Objective-C

Transition from Imap.GetSslServerCert to Imap.GetServerCert

Provides instructions for replacing deprecated GetSslServerCert method calls with GetServerCert.

Chilkat Objective-C Downloads

Objective-C
#import <CkoImap.h>
#import <CkoCert.h>

BOOL success = NO;

CkoImap *imap = [[CkoImap alloc] init];

//  ...
//  ...

//  ------------------------------------------------------------------------
//  The GetSslServerCert method is deprecated:

CkoCert *certObj = [imap GetSslServerCert];
if (imap.LastMethodSuccess == NO) {
    NSLog(@"%@",imap.LastErrorText);
    return;
}

//  ...
//  ...

//  ------------------------------------------------------------------------
//  Do the equivalent using GetServerCert.
//  Your application creates a new, empty Cert object which is passed 
//  in the last argument and filled upon success.

CkoCert *cert = [[CkoCert alloc] init];
success = [imap GetServerCert: cert];
if (success == NO) {
    NSLog(@"%@",imap.LastErrorText);
    return;
}