0

Is it possible to prevent editing when MFMessageComposeViewController shows up?

'Cause I want the body of SMS can't be changed by user and I think it's still legal.

Please help!

HoangNN
  • 11
  • 1
  • 3

1 Answers1

3

No the user has final say when using the MFMessageComposeView. Your app is also prohibited from changing the content/recipient/body of the email when the view slides up.

If you could do this it would be easy to paste in a different recipient, sniff the content provided by the user etc. etc. (especially in the Message App, you could swap the phone number and do terrible things.). I guess this is the logic behind, you get to pre-populate the message, but the user decides from there on and until "Cancel" or "Send".

You should probably build a web service where you have control over the data when it hits the server and make an interface for that on the phone.

RickiG
  • 11,380
  • 13
  • 81
  • 120
  • But I need to hide message text for security reasons. – HoangNN Apr 22 '11 at 15:06
  • 1
    You could see how that could be misused? You can have people sending stuff they could not see to addresses they don't know, from their email or telephone number. If you need hidden stuff directly in there, either go with a web service or encrypt it somehow. (which is security by obscurity by the way). – RickiG Apr 23 '11 at 13:12