What I am trying to figure out how to do is, when I send a regular text message through my iPhone’s built in text messaging app, how can I hard-code a text message (signature) to be displayed after my text message I write to someone?
Example:
- I launch my text messaging app, and I want to send a text to someone named John.
- I then type the following to John in the text field: “Hello John, how are you?”
- After I press the send button, I see the standard bubble, but below my text I sent to John is my hard coded signature.
So it sent my original text as well as my hard coded signature to John. So what exactly do I need to do “code wise” in order to accomplish this? Example code would be great if possible.
Thanks
It’s not a perfect solution—iOS doesn’t allow you to automate the sending of text messages (to prevent spamming and/or junk messages). However, you can present an interface through MFMessageComposeViewController.
In this class there is a
bodyproperty. By setting anNSStringto that property, you can present existing text. Of course the user would still work around that, and could delete it—that is something you have no control over, for UX reasons.