Sent text to notes

I'm trying to add a 'copy to notes' button in my app which sends a text to the notes app of ios. Is there any possible way to integrate this? I've done some research and didn't find anything and since I've never seen it in an other app I guess it's not possible, but I thought It was worth a question.


Good question. Situations like the one you describe are always handled with URL schemes using the UIApplication method openURL:. For example, to launch the phone app with a specific number you could do:

[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"tel:1-234-567-8910"];

Or to launch the Mail app:

[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"mailto:nobody@example.com"];

Just to show a few examples. The Apple URL Scheme Reference document describes all of the various URL schemes to integrate with different system apps. Nowhere in this document does it mention a URL scheme for the built in Notes app. If it were possible to send text to the Notes app, I would expect the document to advertise the fact. While it's not conclusive proof that it's not possible, I still think it should be cited as strong evidence of such.

Note that there are likely several third party note-taking apps that have their own custom URL scheme that may support launching with text.

链接地址: http://www.djcxy.com/p/54740.html

上一篇: 更改图像的src属性是否会阻止图像下载?

下一篇: 发送文本到笔记