我想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)
}