2

I have this code that supposed to send sms in ios

<a href="sms:1-111-1111;body=I made it!">Send location via SMS</a>

but this is not working as will the body text is empty

user3473821
  • 31
  • 1
  • 4

2 Answers2

0

Will not work for iOS 7. See Apple URL Schemes - SMS.

There have been claims that this used to work for iOS 5/6 -

<a href="sms:1-111-1111?body=I made it!">Send location via SMS</a>

Old threads

How to initiate/send SMS from a HTML5 webpage using devices native functions?

How to pre-populate the sms body text via an html link

Community
  • 1
  • 1
raurora
  • 3,623
  • 1
  • 22
  • 29
  • it is the same problem the number show as 1-111-1111, and the text message is empty – user3473821 Jun 01 '14 at 22:43
  • @user3473821 Agreed, if you're on iOS 7. There have been claims that its deprecated. If you find a solution, feel free to add/edit this answer. – raurora Jun 01 '14 at 22:59
0

The below format is working in iOS 8.1 ... might want to test in iOS 7: http://jsfiddle.net/2yjbG/

<a href="sms:1234567900&body=Pre-populated">I pre-populate an SMS</a>

Dan
  • 4,197
  • 6
  • 34
  • 52