简体   繁体   中英

How to delete auto-complete dictionary data on iOS 5.x?

I am trying to turn off storing of auto-complete dictionary data in iPhone for my secure application. I want to prevent data leakage. I have found information that dictionaries are stored under a path: /var/mobile/Library/Keyboard. So the solution is easy. When application is going to foreground I cache all file under the path. When application did enter background I restore data from cache. So all new words added to dictionaries when my application was working aren't stored. It works great but only on iOS 6.x...

On iOS 5.x I learnt a dictionary a few new words then entered to background and then returned to application, auto-complete feature remembered the new words. I checked data under the path and it doesn't have these new words ! Furthermore in another application auto-complete feature doesn't "know" these new words ! When I relaunch my application the new words are unknown. That is mean there has to be another mechanism or local file that store these information only for working application.

How to permanently delete all auto-complete dictionary data from device with iOS 5.x ?

Don't enable autocomplete on your secure fields. It's nothing but an annoyance anyway since things like usernames and passwords aren't suited for it. Documentation for this is here .

The autocomplete dictionary is, AFAIK, global to iOS, and your solution mentioned wont work on the device (it may work on the simulator) as your app won't have access to that folder.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM