Mail.appでメールを読むアプリを作っています。まず、アプリケーションはMail.appからすべての送信者を使用して取得します
NSArray *emailSenders = [self.mailBox.messages arrayByApplyingSelector:@selector(sender)];
ターゲットユーザーの電子メールコンテンツを表示する必要があります。たとえば、「abc@gmail.com」からのすべてのメールのみを表示するため、ターゲットユーザーの電子メールを含む送信者インデックスを取得します。
[emailSenders enumerateObjectsUsingBlock:^(NSString *emailSender, NSUInteger idx, BOOL *stop) {
if([emailSender rangeOfString:userEmail].location != NSNotFound){
[emails addObject:[self.mailBox.messages objectAtIndex:idx]];
}
}];
emailsはによって作成されたSBElementArrayです
SBElementArray *emails = [[SBElementArray alloc]init];
Apple Script Eventを1回だけ送信して、メールのすべてのコンテンツを取得したい。
[mails arrayByApplyingSelector:@selector(content)];
だから私は自分のSBElementArrayを作成しますが、問題はXcodeの表示です:*** -[SBElementArray init]: should never be used.
このコードを実行するとき、それを修正するにはどうすればよいですか?