简体   繁体   English

通过新的iOS 11 iMessage键盘应用程序集成发送文件

[英]Sending files via the new iOS 11 iMessage keyboard app integration

I am trying to send a text file like a .txt file via the new iOS 11 iMessage keyboard app integration. 我正在尝试通过新的iOS 11 iMessage键盘应用程序集成发送文本文件(如.txt文件)。 Is that possible? 那可能吗?

From what I could tell from the imessage (message) template in the API doc, everything about the in-keyboard apps have to be visual message when sent. 从我从API文档中的imessage(消息)模板可以看出,有关键盘应用程序的所有信息在发送时都必须是可视消息。 https://developer.apple.com/documentation/messages/msmessagetemplatelayout https://developer.apple.com/documentation/messages/msmessagetemplatelayout

Can we send any time of file? 我们可以在任何时间发送文件吗? If yes, what are its limits? 如果是,其限制是什么?

You can send an file in an MSConversation 您可以在MSConversation中发送文件

The MSConversation class represents a conversation in the Messages app. MSConversation类表示“消息”应用程序中的对话。 Use conversation objects to access information about the currently selected message or the conversation participants, or to send text, stickers, attachments, or message objects. 使用对话对象可访问有关当前所选消息或对话参与者的信息,或发送文本,标签,附件或消息对象。

Using either 使用任一

insertAttachment :withAlternateFilename:completionHandler: which will insert the attachment into the message input field insertAttachment:withAlternateFilename:completionHandler:它将附件插入消息输入字段

or 要么

sendAttachment :withAlternateFilename:completionHandler: which sends the media file specified by the given URL. sendAttachment:withAlternateFilename:completionHandler:发送给定URL指定的媒体文件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 通过键盘应用程序或iMessage应用程序截屏 - Take screenshots via keyboard app or iMessage app 通过iOS11文件应用程序在应用程序中导入多个文件 - Import multiple files in app via iOS11 files app 在iMessage应用扩展iOS 10中将附件​​发送到会话时崩溃 - Crash in sending attachment to conversation in iMessage app extension iOS 10 发送iMessage尽可能简单的iOS - Sending an iMessage as simple as possible iOS 如何通过在iMessage中点击“发送”等操作从iOS键盘扩展中检测到文本字段被清除? - How to detect from iOS keyboard extension that a textfield is cleared via actions like hitting “Send” in iMessage? 在iOS 8中使用自定义键盘在iMessage中共享图像 - Share image in iMessage using Custom Keyboard in iOS 8 像iPad上的iMessage应用程序一样拆分键盘 - Split keyboard like iMessage app on iPad 键盘上的UIView类似于iMessage App - UIView atop the Keyboard similar to iMessage App iOS iMessage应用程序扩展-复制iMessage Sticker应用程序行为 - iOS iMessage App Extension - Replicate iMessage Sticker App Behavior 是否可以通过Expo将文件写入iOS文件系统,以便可以通过iOS 11文件应用访问 - Is it possible to write a file to the iOS filesystem with Expo so that it is accessible via the iOS 11 Files app
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM