简体   繁体   English

使用phonegap 2.9.0在iPhone中以编程方式在后台发送短信

[英]send sms in the background programmatically in iphone using phonegap 2.9.0

I know we can use 我知道我们可以用

MFMessageComposeViewController MFMessageComposeViewController

to compose message and forward the SMS 撰写邮件并转发短信

My question is how can we send an SMS in the background ??? 我的问题是我们如何在后台发送短信?

I am working on an application which has prefixed number of recipients and a fixed message body . 我正在开发一个带有前缀收件人数和固定消息正文的应用程序。 The user has to press a send button only once and this predefined message will be forwarded to all the recipients in the background . 用户只需按下一次发送按钮,该预定义的消息就会转发给后台的所有收件人。

The user should NOT be taken to messages application where he can edit the message body , add/remove recipients and then send the message 不应将用户带到可编辑消息正文,添加/删除收件人然后发送消息的消息应用程序

If there are any third party api then can they be used along with phonegap ?? 如果有任何第三方api,那么它们可以与phonegap一起使用吗? and will the app be rejected ?? 并会拒绝该应用程序吗?

Kindly help !!! 请帮助!

Well, there is no documented solution. 好吧,没有记录在案的解决方案。 You may use undocumented approach, it is technically possible, but there is no way for You to AppStore then. 您可以使用未记录的方法,从技术上讲是可行的,但此时您无法进入AppStore。

I only know native (ObjC) coding, not PhoneGap, but PhoneGap can't do more than native coding so I can tell you quite clearly that there is no way to send an SMS without opening the MFMessageComposeViewController . 我只知道本机(ObjC)编码,而不是PhoneGap,但是PhoneGap不能做的仅仅是本机编码,因此我可以很清楚地告诉您,如果不打开MFMessageComposeViewController ,就无法发送SMS。 This is done to protect users from having messages sent without their consent. 这样做是为了防止用户未经他们的同意而发送消息。 There is no way around this. 没有办法解决这个问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM