duci9y
duci9y

Reputation: 4168

How often are NSUserDefaults synchronised?

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?

Upvotes: 5

Views: 620

Answers (1)

user529758
user529758

Reputation:

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 calls NSLog() every time it's synchronized.

Upvotes: 8

Related Questions