XCode: (xxx) 没有可见的@interface 声明了选择器 (xxx)

XCode: No visibile @interface for (xxx) declares the selector (xxx)

我正在尝试添加向短信添加附件的功能。以下

if([MFMessageComposeViewController canSendAttachments]) {
    if(args[@"attachments"]) {
        NSString *attachmentData = [RCTConvert NSString:args[@"attachment"][@"data"]];
        NSString *typeIdentifier = @"kUTTypeJPEG";
        NSString *attchmentName = [RCTConvert NSString:args[@"attachment"][@"name"]];

        [mcvc addAttachmentData:attachmentData typeIdentifier:typeIdentifier fileName:attachmentName]
    }
}

抛出此错误:

No Visible @interface for 'MFMessageComposeViewController' declares the selector 'addAttachmentData:attachmentData typeIdentifier:typeIdentifier fileName:attachmentName'

方法的正确名称是addAttachmentData:typeIdentifier:filename:

请参阅最后一个参数标签中的小写 "n"。

你必须使用addAttachmentData:typeIdentifier:filename:
你的方法拼错了。