ios - 无法使用 UIActivityViewController 共享到 whatsapp 的超链接

标签 ios ios9 whatsapp uiactivityviewcontroller

我尝试使用 UIActivityViewController 与超链接共享一些文本在我的应用程序中,文本使用 <html> 格式化脚本如图所示。

 UIActivityViewController *activityVC  [[UIActivityViewController alloc] initWithActivityItems:@[@"<html><body><b>This is a bold string</b><br\\>Check out this amazing site: <a href='http://apple.com'>Apple</a></body></html>"] applicationActivities:nil];

它在许多社交媒体应用程序中显示良好,但不适用于 whatsapp。在 whatsapp 中,它仅显示为纯文本(附上检查图片),

for gmail app <-------对于 gmail 应用程序 for whatsapp app <-------对于 whatsapp 应用程序

这里有什么问题?请帮我。谢谢。

最佳答案

可能是 Whatsapp Messenger 不支持。正如此链接中提到的。 https://www.whatsapp.com/faq/en/iphone/23559013

WhatsApp Messenger can handle various types of media:

images of any type that conforms to public.image (for example, PNG and JPEG)
videos of any type that conforms to public.movie (for example, MPEG-4 video)
audio files (only MPEG-3, MPEG-4, AIFF, AIFF-C and Core Audio)

关于ios - 无法使用 UIActivityViewController 共享到 whatsapp 的超链接,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34263238/

相关文章:

iphone - 在 iOS 上,为什么更改 CALayer 的帧不会导致动画?

ios - SwiftUI - 在某些情况下隐藏导航栏

ios - 如何检测用户是否在我的应用程序中为本地通知设置了横幅样式警报或 'normal' 样式警报?

ios - 在 iOS 9 中隐藏复制/粘贴/返回面板(快捷方式面板)

xctest - Xcode 7 - 如何启动 UI 测试的界面录制?

android - 如何创建像 whatsapp 这样的部分标题列表?

ios - Timer.scheduledTimer 在 swift 3 中不起作用

javascript - 没有新的苹果设备就不可能开发一个强制触摸网络应用程序吗?

android - 通过 Whatsapp 或以编程方式发送邮件发送 VCard 文件/字符串

ios - 无法在 Whatsapp 上分享文字