xcode 无需用户交互即可自动发送消息

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/6587789/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-14 21:25:22  来源:igfitidea点击:

send message automatically without the user interaction

iphonexcode

提问by JoseMa

Possible Duplicates:
How to programmatically send SMS on the iPhone?
How to send SMS from an iPhone app without opening the SMS interface?

可能的重复:
如何在 iPhone 上以编程方式发送短信?
如何在不打开短信界面的情况下从 iPhone 应用程序发送短信?

I need that my application could to send message automatically without the user interaction.

我需要我的应用程序可以在没有用户交互的情况下自动发送消息。

This is possible? I read something about smslib but is developed in java.

这个有可能?我读了一些关于 smslib 的东西,但它是用 java 开发的。

Is there any framework accepted by apple for to do this?

苹果是否有任何框架可以做到这一点?

thanks for your time in advance...

提前感谢您的时间...

回答by Henrik P. Hessel

No, that's not possible. You have to use the MFMessageComposeViewControllerto get your application accepted by Apple.

不,那不可能。您必须使用MFMessageComposeViewController才能让 Apple 接受您的应用程序。

回答by BDGapps

You can't do that but you can prepopulate the email so they only have to press send. Have a look at the MFMessageComposeViewController.

您不能这样做,但您可以预先填充电子邮件,这样他们只需按发送即可。看看 MFMessageComposeViewController。

回答by Louie

Jose, I am HOPINGthat by "no user interaction" you mean the user does not need to see the MFMessageComposeViewController and actually push "Send" again.

何塞,我希望“无用户交互”是指用户不需要查看 MFMessageComposeViewController 并实际再次推送“发送”。

In the event that you are having them fill out a form, and then click "Send" and wanting the app to actually send at that time without having to show the MFMessage Controller, then YES this can be done.

如果您让他们填写表格,然后单击“发送”并希望应用程序在那时实际发送而不必显示 MFMessage 控制器,则可以这样做。

Take a look at my answer on a related question, it is the "accepted" one. Follow the steps and this will help you solve your problem. AGAIN, you should ONLY use this if the user knows you are sending an email, otherwise your app will be rejected.

Locking the Fields in MFMailComposeViewController

看看我对一个相关问题的回答,它是“接受”的。按照步骤操作,这将帮助您解决问题。再次强调,只有在用户知道您正在发送电子邮件时才应使用此选项,否则您的应用将被拒绝。

锁定 MFMailComposeViewController 中的字段

Good luck and happy coding!

祝你好运,编码愉快!