0

我想WhatsApp在我的应用程序中集成共享,但我不想使用UIDocumentInteractionController. 有什么方法可以使用共享图像url scheme吗?就像我们使用下面的代码使用 url 方案共享文本

var whatsappURL:NSURL?= NSURL(string: "whatsapp://send?text=Hello%2C%20World!")
if (UIApplication.shared.canOpenURL(whatsappURL)) {    
        UIApplication.shared.openURL(whatsappURL) 
    }
4

1 回答 1

0

我觉得你做不到。

首先,Whatapps 仅支持通过URLScheme. 其次,如何将图像放入 urlString 中?将其转换为base64string?

您只能使用UIDocumentInteractionController发送图像

于 2018-09-19T06:17:49.497 回答