IOS – Where does Apple’s predictive keyboard get its “contextual” content from

icloudioskeyboardSecurity

So I was playing around with the iOS 8, when I notice that upon typing "new" anywhere, the predictive keyboard suggests the term "NewTerm". I recall using this word in a tweet, so I brushed it off. But then, when writing the word "swift", the keyboard suggested "Swisslapse" upon having written "swi". Now this shocked me quite a bit, as I have only used the term "Swisslapse" in a private iMessage chat, which had been deleted three months back (from all my devices). I tried typing a few other words that I had used recently in Safari (running in private mode), but to my relief the keyboard did not suggest them.

However, this creates a couple of questions:

  • Does Apple cache my iMessage chats?
  • Does Apple cache my keyboard input in selected apps?
  • Is it possible to request a purge of my caches?
  • How can I disable further caching (if any).

I think it would be helpful to add that I had installed iOS 8 on the 9th of September, right after the GM seed was released to the developer center. Therefore it is impossible for iOS 8's predictive keyboard to have learnt these words at time of input.


Based on the answer provided by Brian Nickel, iOS added the words to my local keyboard dictionary (i.e. words I want autocorrect to learn), which I then synced to iOS 8 while restoring my device from a backup; which resulted into the predictive keyboard suggesting them when seemingly necessary.

So it seems that Apple isn't infringing upon our privacy after all. Glad to have that cleared up!

Best Answer

Speaking only from my experience with iOS 7, the device saves any words you enter but don't autocorrect into your "Keyboard dictionary". The logic is that if you didn't want to correct it, it is a word that you have used and may use again.

I did a basic test. I typed "Swisslapse" into Messages but did not send. After a while I typed "Swiss" and it came up in autocomplete. I confirmed it came up in Notes too. To verify it wasn't Apple app specific I typed a new word into Avocado and it also showed up as a completion suggestion in Notes.

You can clear out your keyboard dictionary by going into Settings.app, General > Reset > Reset Keyboard Dictionary. This answer shows the path to the cache and you could theoretically remove just the offending words using a third-party tool to access and modify the file.

As for preventing new words from being learnt, I would speculate that disabling Auto-Correction would do the trick in iOS 7. Even though "Swisslapse" is an autocomplete suggestion now, it still shows up as an invalid word so it is not interacting with the spell check dictionary. iOS 8 may have more fine grained settings but you have to assume that the predictive keyboard is learning from everything you type and may have to just disable it.

To your question on iMessages, Apple is adamant that they cannot read your messages in transit as they are encrypted on the sender's device only to be read on the receiver's device(s). I would doubt that Apple saves the message contents on device if you delete it there. I haven't tested, but I would doubt they also scan incoming messages for words to autocorrect, though they have started scanning them for predictive text responses. (E.g., "Pizza or Chinese?" generates Pizza and Chinese as the first two predictive responses.)