1

我正在开发与 Whatsapp 共享音频文件的应用程序。因为,我只专注于 Whatsapp,所以我对展示其他可用的应用程序(例如 VLC 或 Telegram)不感兴趣。

我可以选择 Whatsapp App 来分享文件而不显示菜单供选择吗?换句话说,我可以避免 presentOpenInMenuFromRect:inView:anmiated: 吗?

4

1 回答 1

0

您需要使用 UIDocumentInteractionController UTI:net.whatsapp.audio

WhatsApp 的自定义 URL 方案

  _documentController = [UIDocumentInteractionController interactionControllerWithURL:fileURL];
_documentController.delegate = self;
_documentController.UTI = @"net.whatsapp.audio";
[_documentController presentOpenInMenuFromRect:CGRectZero inView:self.view animated:YES]

触发后,WhatsApp 将立即向用户显示联系人/群组选择器屏幕。媒体将自动发送到选定的联系人/组。

于 2014-05-21T09:08:53.337 回答