Objective-C
Objective-C
Transition from Imap.FetchBundle to Imap.FetchMsgSet
Provides instructions for replacing deprecated FetchBundle method calls with FetchMsgSet.Chilkat Objective-C Downloads
#import <CkoImap.h>
#import <CkoMessageSet.h>
#import <CkoEmailBundle.h>
BOOL success = NO;
CkoImap *imap = [[CkoImap alloc] init];
// ...
// ...
CkoMessageSet *mset = [[CkoMessageSet alloc] init];
success = [imap QueryMbx: @"FROM joe@example.com" bUid: YES msgSet: mset];
// ...
// ...
// ------------------------------------------------------------------------
// The FetchBundle method is deprecated:
CkoEmailBundle *bundleObj = [imap FetchBundle: mset];
if (imap.LastMethodSuccess == NO) {
NSLog(@"%@",imap.LastErrorText);
return;
}
// ...
// ...
// ------------------------------------------------------------------------
// Do the equivalent using FetchMsgSet.
// Your application creates a new, empty EmailBundle object which is passed
// in the last argument and filled upon success.
BOOL headersOnly = NO;
CkoEmailBundle *bundleOut = [[CkoEmailBundle alloc] init];
success = [imap FetchMsgSet: headersOnly msgSet: mset bundle: bundleOut];
if (success == NO) {
NSLog(@"%@",imap.LastErrorText);
return;
}