Sample code for 30+ languages & platforms
Swift

Transition from Email.GetSignedByCert to Email.LastSignerCert

Provides instructions for replacing deprecated GetSignedByCert method calls with LastSignerCert.

Chilkat Swift Downloads

Swift

func chilkatTest() {
    var success: Bool = false

    let email = CkoEmail()!

    // ...
    // ...

    // ------------------------------------------------------------------------
    // The GetSignedByCert method is deprecated:

    var certObj: CkoCert? = email.getSignedByCert()
    if email.lastMethodSuccess == false {
        print("\(email.lastErrorText!)")
        return
    }

    // ...
    // ...

    certObj = nil

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

    let certOut = CkoCert()!
    success = email.lastSignerCert(index: 0, cert: certOut)
    if success == false {
        print("\(email.lastErrorText!)")
        return
    }


}