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

Transition from MailMan.LastJsonData to MailMan.GetLastJsonData

Provides instructions for replacing deprecated LastJsonData method calls with GetLastJsonData.

Chilkat Swift Downloads

Swift

func chilkatTest() {
    let mailman = CkoMailMan()!

    //  ...
    //  ...

    //  ------------------------------------------------------------------------
    //  The LastJsonData method is deprecated:

    var jsonObj: CkoJsonObject? = mailman.lastJsonData()
    if mailman.lastMethodSuccess == false {
        print("\(mailman.lastErrorText!)")
        return
    }

    //  ...
    //  ...

    jsonObj = nil

    //  ------------------------------------------------------------------------
    //  Do the equivalent using GetLastJsonData.
    //  Your application creates a new, empty JsonObject object which is passed 
    //  in the last argument.

    let jsonOut = CkoJsonObject()!
    mailman.getLastJsonData(json: jsonOut)

}