I just realized Apple now allows developers to create iMessage Applications. Is anyone familiar with just how much an iMessage Application (or extension) can do? For instance:
Let's say I want to make an extension that reads what the user has typed (in the normal Messages interface), looks for any arithmetic in the text, performs the arithmetic then subs in the answer, and sends the message, all in one click. Is that possible?
I am new to Apple Development and know nothing about their API and frameworks, so I'm a little lost about what's available. I'm a Computer Science student and am hoping I can apply my current knowledge to learn quicker.
Apple's new Messages Framework is pretty limited and, at the moment, does not really allow any of the things you are talking about. The user always has to press the send button, you're unable to send a message without a user's final action. You're also not able to see any other messages in the conversation apart from the ones your app has sent into a certain MSConversation object. Also, it is not possible to see the text the user has typed into the message field, all you're able to do is insert your own text, attachment or MSMessage object.
The only thing that is kind of possible is seeing who is part of the conversation. Messages.framework won't let you see any names, but you can use the remoteParticipantIdentifiers to see who else is in the conversation or use the localParticipantIdentifier to get information about the user who is using your app to send the message. While your app is unable to see the name, you are able to use it in a label on your MSMessage object, see the following code taken from this twocentstudios tutorial:
let layout = MSMessageTemplateLayout()
layout.caption = "My name is $\(conversation.localParticipantIdentifer.uuidString)."
conversation.insert(message, localizedChangeDescription: nil)