Open karam28 opened 3 months ago
I find the updated method I think but it's crashing and no reason mention. here is the crash Thread 5: EXC_BREAKPOINT (code=1, subcode=0x20fc0f374)
MCOIMAPSession *session = [[MCOIMAPSession alloc] init];
session.hostname = @"imap.mail.yahoo.com";
session.port = 993;
session.username = @"karamjeetsinghbuttar@yahoo.com";
session.password = @"ybykuvrpfxqswxqo ";
session.connectionType = MCOConnectionTypeTLS;
MCOIndexSet *uidSet = [MCOIndexSet indexSetWithRange:MCORangeMake(1,UINT64_MAX)];
MCOIMAPFetchMessagesOperation * op = [session fetchMessagesOperationWithFolder:@"INBOX"
requestKind:MCOIMAPMessagesRequestKindHeaders | MCOIMAPMessagesRequestKindStructure
uids:uidSet];
[op start:^(NSError * error, NSArray * messages, MCOIndexSet * vanishedMessages) {
for(MCOIMAPMessage * msg in messages) {
NSLog(@" mails-- %lu: %@", [msg uid], [msg header]);
}
}];
Summary I'm utilizing MailCore2 via CocoaPods. After copying the Objective-C code, my application crashes upon running. The crash is associated with a deprecated method mentioned in the warning from Xcode: 'fetchMessagesByUIDOperationWithFolder:requestKind:uids:'.
Platform(s)
Happens on Mail Server
Piece of code
Actual outcome it should not crash. Please provide the updated method and update that in your documentation also.
Connection Logs