Multiple .plist in Library/Preferences of my app?

Hello.

During an investigation on why my app use a lot of space on disk, i found the Preferences folde in my AppData folder.
In that folder, i have a lot of .plist file. Obvs, this is the file of my UserDefault data. But my app is creating multiple file of it, every minutes.

The name that assign to the file is "bundleId".plist.XXXXXX and the last one is without XXXXXX

How can I stop creating multiple copy of it?
I was thinking that is some rule about the backup of this file, or maybe every time i add/edit a value in my plist, it creates a new file.
Is it possible to avoid this?

Replies

Sounds like you're creating and writing out a UD file once each time instead of updating/replacing the old one.


Show your plist/UD editing code...

Update: The multiple file are only on real device, not in the simulator. I've seen it using "download containers" in Xcode.
Another hint: The last file is the biggest (in mb, 13) and has the real name ( bundleId.plist ). The others files are scalar until 1mb, the last-update-date is 10 minutes before the last one and is about 1mb, and if I open the smallest one, it contains less key. It seems it is adding the key step by step, creating new files everytime. So I don't understand what happens.

Hi!


Did you ever uncover what the cause of this was? We are running into the same issue, have a bunch of users where the app is using a lot of disk space.