开发者

How to send an SMS programmatically on iOS? [duplicate]

开发者 https://www.devze.com 2023-04-05 05:35 出处:网络
This question alrea开发者_如何学运维dy has answers here: How to programmatically send SMS on the iPhone?
This question alrea开发者_如何学运维dy has answers here: How to programmatically send SMS on the iPhone? (18 answers) Closed 4 years ago.

Is there a way to make the ‘send’ button get pressed automatically (programmatically)?


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

0

精彩评论

暂无评论...
验证码 换一张
取 消