iOS 拼写检查器存储哪些信息?

发布于 2024-12-29 07:50:24 字数 166 浏览 0 评论 0 原文

我听说 Apple 的 UITextView 拼写检查器会对您在各个应用程序中键入的内容进行某种记录。我有一个安全的应用程序,其中拼写检查是一个有用的功能,但是我不希望将新单词记录到我的应用程序之外的某个位置。任何人都可以向我推荐一份 Apple 参考文档或技术说明,了解拼写检查会捕获哪些信息以及在何处捕获这些信息?

I have heard that Apple's spell checker for UITextView maintains some kind of logging of what you type in individual applications. I have a secure application where spell checking is a useful feature, however I don't want new words logged to somewhere outside of my application. Can anyone refer me to an Apple reference document or technical description of what information is captured by spell check, and where it is captured too?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

浸婚纱 2025-01-05 07:50:24

不确定这是否有很大帮助,但您可以使用 UITextChecker 类手动进行拼写检查,该类允许设置忽略单词列表:

- (void)setIgnoredWords:(NSArray *)words

更多信息:https://developer.apple.com/library/ios/#documentation/UIKit/Reference/UITextChecker_Class/Reference/Reference.html

您还可以通过以下方式检查该单词是否已学过:

+ (BOOL)hasLearnedWord:(NSString *)word

Not sure if this helps much, but you could do spell checking manually with the UITextChecker class which allows setting a list of ignored words:

- (void)setIgnoredWords:(NSArray *)words

More here: https://developer.apple.com/library/ios/#documentation/UIKit/Reference/UITextChecker_Class/Reference/Reference.html

You can also check whether the word has been learned with:

+ (BOOL)hasLearnedWord:(NSString *)word
剪不断理还乱 2025-01-05 07:50:24

我不确定,但使用 fseventer,学习单词“ TextEdit 中的 aple" 将该单词保存到 ~/Library/Spelling/LocalDictionary。忽略一个单词似乎根本不会修改文件系统,事实上,如果文档被关闭并且没有保存,并且打开了一个包含先前忽略的单词的新文档,则它不再被忽略。这与作为类方法的 +learnWord: 和作为实例方法的 -ignoreWord: 一致。因此,为了安全起见,您可能永远不会调用 +learnWord:,而是拥有自己的后端来持久/安全地存储被忽略单词的列表。

I don't know definitively, but using fseventer, learning the word "aple" in TextEdit saves that word to ~/Library/Spelling/LocalDictionary. Ignoring a word seems not to modify the filesystem at all, and indeed, if the document is closed and not saved, and a new document with that previously-ignored word is opened, it is no longer ignored. This is consistent with +learnWord: being a class method, and -ignoreWord: being an instance method. So for security, you could probably just never call +learnWord:, and instead have your own backend to persistently/securely store a list of ignored words.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文