开发者

Sending SMS in background from iPhone 4

I am creating an application that sends and SMS while taping on a button. To implement this functionality I installed the iPhone SDK 4. Since it supports in app SMS. But when I tap on my button to send SMS the MessageUI view controller is displayed along with my custom SMS body. I dont want to display this screen, I just need to send the SMS in开发者_开发百科 the background with out displaying the SMS screen to the User.

Can any one help me in solving this.? Please help needed.

Thanks and Regards, Shibin


I'm pretty sure there's no way to do this. Apple wants the user to confirm an SMS send for at least a couple of reasons:

  • SMS costs the user money to send
  • If your app could send without confirmation, you could spam contacts from the user's address book, or worse, give them a link to a phishing site that they trust because the text came from a trusted source

Why do you care if the user confirms the SMS or not? As soon as they tap "Send", the MessageUI view controller is dismissed and the user is back in your app's screen.

The only alternative I can think if is to send an NSHTTPURLRequest to a web service that provides an SMS gateway. That you could certainly do in the background, though likely you (the developer, not the user) would incur the cost of sending the messages, and the sender would not appear to be the user.


According to the official Class Reference provided by Apple, the composing message will always come up so that the user can confirm the message.


No, you cannot do that. There is a reason for that MessageUI controller showing - it's to confirm with the user that indeed the SMS is sent with her knowledge and understanding.


Without message body you can't send a message to the user. You want to send a message in background .Simply you refer the topic like web service, api reference .Its help you to send a message in background. hope this is helpful for you..

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜