Search code examples
iosplistimessageairdrop

Is it possible to send files as iMessage attachments?


Is it possible to send files as iMessage attachments?

I would like to:

  • create a file (e.g. plist file) from an App
  • send it to another phone via iMessage
  • open it from the other phone and save it in the documents folder
  • open the app in the "other" phone (the app will look into the Documents folder and search for the saved plist file)

Alternatively I am wondering whether it is possible to save a plist file from the app to another phone (e.g. via AirDrop).


Solution

  • Let's make clear the concept of attachment in iMessage apps.

    The attachment in the iMessage context is an every kind of file you send and you let iMessage manage how to display it (you don't get any trigger when it's opened by the receiver).

    To get a trigger when the receiver opens the attachment, you have to send the media file via MSMessage instance. In this way you can directly handle the tap gesture on the bubble. But there are some limitations (you can only send images, audio or videos).

    In practice, there is no way, as far as I know, to achieve your expected result.

    Can I ask you why you should look inside the documents folder for the plist file when the receiver taps on it?