Objective-C
Objective-C
Transition from Imap.ThreadCmd to Imap.QueryThread
Provides instructions for replacing deprecated ThreadCmd method calls with QueryThread.Chilkat Objective-C Downloads
#import <CkoImap.h>
#import <NSString.h>
#import <CkoJsonObject.h>
BOOL success = NO;
CkoImap *imap = [[CkoImap alloc] init];
// ...
// ...
NSString *threadAlg = @"REFERENCES";
NSString *charset = @"UTF-8";
NSString *searchCriteria = @"SUBJECT a";
BOOL bUid = YES;
// ------------------------------------------------------------------------
// The ThreadCmd method is deprecated:
CkoJsonObject *jsonObj = [imap ThreadCmd: threadAlg charset: charset searchCriteria: searchCriteria bUid: bUid];
if (imap.LastMethodSuccess == NO) {
NSLog(@"%@",imap.LastErrorText);
return;
}
// ...
// ...
// ------------------------------------------------------------------------
// Do the equivalent using QueryThread.
// Your application creates a new, empty JsonObject object which is passed
// in the last argument and filled upon success.
imap.SearchCharset = @"UTF-8";
CkoJsonObject *json = [[CkoJsonObject alloc] init];
success = [imap QueryThread: threadAlg searchCriteria: searchCriteria bUid: bUid json: json];
if (success == NO) {
NSLog(@"%@",imap.LastErrorText);
return;
}