Code:
Linking.openURL('sms:'+number+'?body=Hi');
I try to open message app with mobile no and content.but mobile no and content combine together in to section.How to fix this issue?any help will be appricated.thanks in advance
The working syntax on iOS (as at 11.2) appears to be sms:123&body=mybody
, note the &
as a separator rather than ?
.
Be warned though this &
separator is contrary to RFC5724 (and Android), so somewhat likely to change in future iOS versions.
Also, interestingly Apple has this to say (emphasis added):
The format for URLs of this type is
sms:<phone>
, where<phone>
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With