Sample code for 30+ languages & platforms
Swift

Transition from Imap.GetAllUids to Imap.QueryMbx

Provides instructions for replacing deprecated GetAllUids method calls with QueryMbx.

Chilkat Swift Downloads

Swift

func chilkatTest() {
    var success: Bool = false

    let imap = CkoImap()!

    // ...
    // ...

    // ------------------------------------------------------------------------
    // The GetAllUids method is deprecated:

    var msgSetObj: CkoMessageSet? = imap.getAllUids()
    if imap.lastMethodSuccess == false {
        print("\(imap.lastErrorText!)")
        return
    }

    // ...
    // ...

    msgSetObj = nil

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

    let mset = CkoMessageSet()!
    success = imap.queryMbx(criteria: "ALL", bUid: true, msgSet: mset)
    if success == false {
        print("\(imap.lastErrorText!)")
        return
    }


}