知道 'MFMessageComposeViewController' 的最终收件人和消息?

Knowing the final recipients & message with 'MFMessageComposeViewController'?

我有几个关于 MFMessageComposeViewController 的问题:

  1. 有没有办法知道用户实际将短信发送给了谁?
    或者,至少能知道短信发给了多少号码?
  2. 实际发送的消息是什么?


到目前为止,这是我所拥有的,并且可以正常工作。但是好像只有一个delegate,但是简单到几乎没什么用

- (void)showSMS:(NSArray *)numbers message:(NSString *)message {

        MFMessageComposeViewController *messageController = [[MFMessageComposeViewController alloc] init];
        messageController.messageComposeDelegate = self;
        [messageController setRecipients:numbers];
        [messageController setBody:message];

        [self presentViewController:messageController animated:YES completion:nil];
    }


- (void)messageComposeViewController:(MFMessageComposeViewController *)controller didFinishWithResult:(MessageComposeResult) result {

    if (result == MessageComposeResultCancelled) {

        NSLog(@"SMS cancelled");
    }
    else if (result == MessageComposeResultFailed) {

        NSLog(@"SMS failed");
    }
    else if (result == MessageComposeResultSent) {

        NSLog(@"SMS sent");
    }

    [self dismissViewControllerAnimated:YES completion:nil];
}


谢谢

这是不可能的。 iOS SDK 没有提供访问它的方法。

来自 Apple 的 MFMessageComposeViewController 文档:

Important: The message composition interface itself is not customizable and must not be modified by your app. In addition, after presenting the interface, your app is unable to make further changes to the message content. The user can edit the content using the interface, but programmatic changes are ignored. Thus, you must set the values of content fields, if desired, before presenting the interface.