You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I found that although apps write almost all their files to their respective folders, their NSUserDefaults are still written to LiveContainer's Library/Preferences, which creates a mess in that folder and is hard for users to move apps to other devices.
I wander if it's possible to redirect NSUserDefaults writes to some folder in Document?
Instructions to reproduce
Install any app that uses NSUserDefaults and check LiveContainer's Library/Preferences
What version of LiveContainer are you using?
2.1.2
Other info
I dumped symbols of NSUserDefaults class and didn't find any way to set a path. I wonder if it's hard coded into that class, or it uses a different environment variable other than HOME?
I also tried to create a symlink but iOS didn't allow any write to Library/Preferences folder it self.
There is a method caller -[NSUserDefaults _initWithSuiteName:container:] but it seems that not all NSUserDefaults are instantiated by this method.
The text was updated successfully, but these errors were encountered:
I found a method -[NSUserDefaults _container] that I can hook to redirect most NSUserDefaults write to other location, but some still write directly to Library/Preferences
Describe the bug
I found that although apps write almost all their files to their respective folders, their NSUserDefaults are still written to LiveContainer's
Library/Preferences
, which creates a mess in that folder and is hard for users to move apps to other devices.I wander if it's possible to redirect NSUserDefaults writes to some folder in Document?
Instructions to reproduce
Install any app that uses NSUserDefaults and check LiveContainer's
Library/Preferences
What version of LiveContainer are you using?
2.1.2
Other info
I dumped symbols of NSUserDefaults class and didn't find any way to set a path. I wonder if it's hard coded into that class, or it uses a different environment variable other than
HOME
?I also tried to create a symlink but iOS didn't allow any write to
Library/Preferences
folder it self.There is a method caller
-[NSUserDefaults _initWithSuiteName:container:]
but it seems that not allNSUserDefaults
are instantiated by this method.The text was updated successfully, but these errors were encountered: