gpt4 book ai didi

ios - 通过 WhatsApp 分享图片,只需显示 WhatsApp 图标

转载 作者:行者123 更新时间:2023-11-29 12:45:14 34 4
gpt4 key购买 nike

我使用这段代码,但它显示了其他应用程序。

NSURL *URL = [[NSBundle mainBundle] URLForResource:@"ABC" withExtension:@"png"];
if (URL)
{
self.documentInteractionController = [UIDocumentInteractionController interactionControllerWithURL:URL];
[self.documentInteractionController setDelegate:self];
CGRect rect = self.view.frame;
[self.documentInteractionController presentOpenInMenuFromRect:rect inView:self.view animated:YES];

如何只显示 WhatsApp 图标?

最佳答案

以下是 WhatsApp 开发人员文档:https://www.whatsapp.com/faq/iphone/23559013

这里是相关的部分:

Alternatively, if you want to show only WhatsApp in the application list (instead of WhatsApp plus any other public/*-conforming apps) you can specify a file of one of aforementioned types saved with the extension that is exclusive to WhatsApp:

images - «.wai» which is of type net.whatsapp.image

videos - «.wam» which is of type net.whatsapp.movie

audio files - «.waa» which is of type net.whatsapp.audio

因此,为了共享图像,您可以将 UIDocumentInteractionControllerUTI 设置为 net.whatsapp.image 并附加扩展名 .wai 到你的文件路径。

此外,this question可能有一些有用的示例代码。

关于ios - 通过 WhatsApp 分享图片,只需显示 WhatsApp 图标,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23821829/

34 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com