使用URL方案的iOS版Gmail应用中的换行符 [英] New Line in Gmail App for iOS using URL Scheme

查看:114
本文介绍了使用URL方案的iOS版Gmail应用中的换行符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在开发一个iOS应用,而我们恰好在使用Gmail应用的URL方案为用户撰写一封新电子邮件.我们已经弄清了大部分内容,但是在电子邮件正文中添加新行时遇到了一些麻烦.到目前为止,我们的URL如下所示:

We are working on an iOS app and we happen to be using the Gmail app's URL Scheme to compose a new email for the user. We figured out most of it, however we are having some trouble adding new lines in the body of the email. So far our URL looks like this:

googlegmail://co?from=username@example.com&to=helpdesk@example.com&subject=TITLE&body=What%20ever%20they%20include%20for%20the%20body

我们已经尝试使用%0D%0A以及其他一些选项,但是这些选项似乎都不起作用.是否有任何方法可以通过URL添加新行,或者只是不可能?

We have already tried using %0D%0A, as well as a few other options, however none of those seem to work. Is there any way to add a new line through the URL or is that just not possible?

推荐答案

我以前只使用过此方案一次,因此不需要创建新行的功能,但是在看了一下之后,我认为就像你一样陷入困境我的猜测是使用这种方法是不可能的.在我看来,它只专注于在单词之间放置空格.

I have only used this scheme once before and I didn't need the ability to create new lines, but after taking a look at it, I'm as stumped as you are. My guess is that this isn't possible using this method. It seems to me that it only focuses on putting spaces between words.

我建议调查的一件事是iOS的 Gmail API .您很可能会对此感到更幸运,而且还有更多控制消息的好处.您可以使用 CocoaPods 轻松安装它,而且设置时间很短.

One thing I would recommend looking into is the Gmail API for iOS. You will most likely have much more luck with this and there's also the upside of having more control over your messages. You can easily install it with CocoaPods and it doesn't take long to set up at all.

这篇关于使用URL方案的iOS版Gmail应用中的换行符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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