使用默认文本响应本机 iOS 打开消息应用程序 [英] React native iOS open message app with default text

查看:32
本文介绍了使用默认文本响应本机 iOS 打开消息应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

推荐答案

如果你想让用户从联系人中选择,你可以传递null如下:

If you want the user to select from contacts, you can pass null as follows:

Linking.openURL(`sms:&addresses=null&body=My sms text`);

否则,为了在 iOS 中已经选择了多个数字:

Otherwise, in order to have multiple numbers already selected in iOS:

Linking.openURL(`sms:&addresses=replace_with_comma_seperated_numbers&body=My sms text`);

这篇关于使用默认文本响应本机 iOS 打开消息应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆