菜鸟教程小白 发表于 2022-12-12 16:45:54

ios - 显示所有支持发送消息的应用程序(聊天)


                                            <p><p>我想显示我的应用程序中支持聊天的所有应用程序。实际上,我需要通过安装在我的 iOS 设备中的消息应用程序(即 WhatsApp、微信等)发送选定的文本。</p>

<p>我已经通过 UIDocumentInteractionController 但它只允许共享文件。但就我而言,我只想分享文字。</p>

<p>这可能吗。请帮帮我,谢谢。</p></p>
                                    <br><hr><h1><strong>Best Answer-推荐答案</ strong></h1><br>
                                            <p><p>iOS 没有一个共享文本的选项,<a href="https://developer.apple.com/library/IOS/documentation/UIKit/Reference/UIActivityViewController_Class/Reference/Reference.html" rel="noreferrer noopener nofollow"><code>UIActivityViewController</code></a>可以使用并将显示 iOS 集成的社交网络。</p>

<p>只要应用程序具有支持它的 URL 方案,您就可以将自己的服务添加到此对话框。
Whatsapp <a href="https://developer.apple.com/library/ios/documentation/uikit/reference/UIActivity_Class/Reference/Reference.html" rel="noreferrer noopener nofollow"><code>UIActivity</code></a> 的示例: <a href="https://github.com/jberlana/JBWhatsAppActivity" rel="noreferrer noopener nofollow">https://github.com/jberlana/JBWhatsAppActivity</a> </p></p>
                                   
                                                <p style="font-size: 20px;">关于ios - 显示所有支持发送消息的应用程序(聊天),我们在Stack Overflow上找到一个类似的问题:
                                                        <a href="https://stackoverflow.com/questions/20215920/" rel="noreferrer noopener nofollow" style="color: red;">
                                                                https://stackoverflow.com/questions/20215920/
                                                        </a>
                                                </p>
                                       
页: [1]
查看完整版本: ios - 显示所有支持发送消息的应用程序(聊天)