Search code examples
ios10imessage

iMessage API, accessing texts not sent through your app


I'm looking for a way to detect if links have been shared in an iMessage conversation. I'm not sure if this can be done with MSMessage, as it looks like it only receives events from messages created by your iMessage app.

Does this mean there is no way to access the conversation outside of the scope of messages created by your iMessage app? Any help is very much appreciated!


Solution

  • Your suspicion is correct. You can only access your own extension's messages.

    Quote from the documentation for MSMessagesAppViewController.didReceive(_:conversation:):

    You only receive notifications about messages sent using your extension. You cannot interact with messages from other extensions.