sms url scheme not working on IOS5

我只是一个虾纸丫 提交于 2019-12-10 18:36:17

问题


In my web app targeted to iphone and android, I have a "TEXT ME" button which when clicked, leads the user to sms with number and body prefilled. This works fine in iphone prior to ios 5. In IOS 5, clicking on the button does not lead to sms applicatin. Is there any change in IOS 5 for sms url scheme which i am missing. Here is what i am using sms:2062142930?body=Mobile%20Inquiry&

Thanx zAfar


回答1:


Perhaps try this without a message body. The Apple URL scheme reference [1] says this about text links:

  • The sms scheme is used to launch the Text application. The format for URLs of this type is “sms:”, where is an optional parameter that specifies the target phone number of the SMS message. This parameter can contain the digits 0 through 9 and the plus (+), hyphen (-), and period (.) characters. The URL string must not include any message text or other information*

So while this may have worked in the past they may have enforced the last part (must not include any message text), probably to mitigate some misuse.

[1] http://developer.apple.com/library/ios/featuredarticles/iPhoneURLScheme_Reference/iPhoneURLScheme_Reference.pdf



来源:https://stackoverflow.com/questions/8414986/sms-url-scheme-not-working-on-ios5

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!