Sample code for 30+ languages & platforms
Swift Requires Chilkat v11.0.0+

Transition from Email.FindIssuer to Cert.GetIssuer

Provides instructions for replacing deprecated FindIssuer method calls with Cert.GetIssuer.

Chilkat Swift Downloads

Swift

func chilkatTest() {
    var success: Bool = false

    let email = CkoEmail()!
    let cert = CkoCert()!

    //  ...
    //  ...

    //  ------------------------------------------------------------------------
    //  The FindIssuer method is deprecated:

    var certObj: CkoCert? = email.findIssuer(cert: 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()!
    success = cert.getIssuer(issuer: issuerCert)
    if success == false {
        print("\(email.lastErrorText!)")
        return
    }


}