使用 URL 方案的 iOS Gmail 应用程序中的新行

New Line in Gmail App for iOS using URL Scheme

我们正在开发 iOS 应用程序,我们恰好使用 Gmail 应用程序的 URL 方案为用户撰写新电子邮件。我们解决了大部分问题,但是我们在电子邮件正文中添加新行时遇到了一些问题。到目前为止,我们的 URL 看起来像这样:

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

我们已经尝试使用 %0D%0A 以及一些其他选项,但是其中 none 似乎有效。有什么方法可以通过 URL 添加新行还是不可能?

我以前只用过一次这个方案,不需要创建新行的能力,但看了之后,我和你一样难过。我的猜测是使用这种方法是不可能的。在我看来,它只专注于在单词之间放置空格。

我建议研究的一件事是 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,它根本不需要很长时间。