Objective-C
Objective-C
Transition from Imap.FetchSingle to Imap.FetchEmail
Provides instructions for replacing deprecated FetchSingle method calls with FetchEmail.Chilkat Objective-C Downloads
#import <CkoImap.h>
#import <CkoEmail.h>
BOOL success = NO;
CkoImap *imap = [[CkoImap alloc] init];
// ...
// ...
// ------------------------------------------------------------------------
// The FetchSingle method is deprecated:
CkoEmail *emailObj = [imap FetchSingle: 1 bUid: NO];
if (imap.LastMethodSuccess == NO) {
NSLog(@"%@",imap.LastErrorText);
return;
}
// ...
// ...
// ------------------------------------------------------------------------
// Do the equivalent using FetchEmail.
// Your application creates a new, empty Email object which is passed
// in the last argument and filled upon success.
BOOL headerOnly = NO;
CkoEmail *email = [[CkoEmail alloc] init];
success = [imap FetchEmail: headerOnly msgId: 1 bUid: NO email: email];
if (success == NO) {
NSLog(@"%@",imap.LastErrorText);
return;
}