iPhone: How to disable editing when MFMessageCompo

2019-06-12 11:20发布

问题:

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!

回答1:

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.