(Objective-C) Transition from Email.FindIssuer to Cert.GetIssuer
Provides instructions for replacing deprecated FindIssuer method calls with Cert.GetIssuer. Note: This example requires Chilkat v11.0.0 or greater.
#import <CkoEmail.h>
#import <CkoCert.h>
CkoEmail *email = [[CkoEmail alloc] init];
CkoCert *cert = [[CkoCert alloc] init];
// ...
// ...
// ------------------------------------------------------------------------
// The FindIssuer method is deprecated:
CkoCert *certObj = [email FindIssuer: cert];
if (email.LastMethodSuccess == NO) {
NSLog(@"%@",email.LastErrorText);
return;
}
// ...
// ...
// ------------------------------------------------------------------------
// Do the equivalent using Cert.GetIssuer.
// Your application creates a new, empty Cert object which is passed
// in the last argument and filled upon success.
CkoCert *issuerCert = [[CkoCert alloc] init];
BOOL success = [cert GetIssuer: issuerCert];
if (success == NO) {
NSLog(@"%@",email.LastErrorText);
return;
}
|