The documentation for NSUserDefaults
says that the synchronise
method is called periodically but does not mention how frequently. 10 minutes of Google searches did not reveal anything.
How frequently is the synchronise
method called?
The documentation for NSUserDefaults
says that the synchronise
method is called periodically but does not mention how frequently. 10 minutes of Google searches did not reveal anything.
How frequently is the synchronise
method called?
This is an implementation detail which is not disclosed (probably it isn't even a constant time interval). However, you can find it out yourself by performing a method swizzling on
- [NSUserDefaults synchronize]
and changing its implementation so that it callsNSLog()
every time it's synchronized.