(Swift) 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.
func chilkatTest() {
let email = CkoEmail()!
let cert = CkoCert()!
// ...
// ...
// ------------------------------------------------------------------------
// The FindIssuer method is deprecated:
var certObj: CkoCert? = email.findIssuer(cert)
if email.lastMethodSuccess == false {
print("\(email.lastErrorText!)")
return
}
// ...
// ...
certObj = nil
// ------------------------------------------------------------------------
// 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.
let issuerCert = CkoCert()!
var success: Bool = cert.getIssuer(issuerCert)
if success == false {
print("\(email.lastErrorText!)")
return
}
}
|