开发者

HelperApp unable to read user defaults from PrefPane

My project is composed by a PrefPane to set user defaults and a HelperApp that's running in background. Both are accessing the shared preferences plist file through CFPr开发者_运维百科eferences functions.

Basically the HelperApp is a CFRunLoopSourceRef: when it's triggered by power source events, it reads user defaults from the preferences plist and reacts.

The problem, is the following: if I modify user defaults from the PrefPane when the HelperApp is running in background, it's not able to read the modified settings even if it seems to read the preferences plist every time it's triggered.


Are you forcing a sync-to/from-disk? (Via CFPreferencesAppSynchronize or CFPreferencesSynchronize.)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜