Is there a way to make the ‘send’ button get pressed automatically (programmatically)?
Asked
Active
Viewed 1,393 times
1 Answers
5
Absolutely not. Once you present e-mail or SMS composition view controllers, you have no more programmatic control over those interfaces. Apple would consider such a thing a violation of security or privacy. You're out of luck, unfortunately.
From the documentation for MFMessageComposeViewController
:
Important: The message composition interface itself is not customizable and must not be modified by your application. In addition, after presenting the interface, your application is unable to make further changes to the SMS content. The user can edit the content using the interface, but programmatic changes are ignored. Thus, you must set the values of content fields, if desired, before presenting the interface

CIFilter
- 8,647
- 4
- 46
- 66
-
so how to achieve that? I want to know about it.. how to send sms by clicking a button only. if we dont use MFMessageComposeViewController can we do then. Regards, Ujjwal – Ujwal Sep 16 '11 at 05:51
-
The only think you can do is send the data to your own backend server and have it use some sort of SMS protocol (or even e-mail if you know the cell provider) to send the data on your app's behalf. As it stands, there seems to be no possible way to do what you want purely in iOS. – CIFilter Sep 16 '11 at 09:14