Sample code for 30+ languages & platforms
Objective-C

Transition from Cert.GetCertChain to Cert.BuildCertChain

Provides instructions for replacing deprecated GetCertChain method calls with BuildCertChain.

Chilkat Objective-C Downloads

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

BOOL success = NO;

CkoCert *cert = [[CkoCert alloc] init];

//  ------------------------------------------------------------------------
//  The GetCertChain method is deprecated:

CkoCertChain *certchainObj = [cert GetCertChain];
if (cert.LastMethodSuccess == NO) {
    NSLog(@"%@",cert.LastErrorText);
    return;
}

//  ...
//  ...

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

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