CFPreferencesCopyKeyList for App Group

We use AppGroups to share information between app and extension.


I need to get list of keys stored in the defaults. There is a method 'dictionaryRepresentation' which returns all keys and values. I'm worried if retreiving all values shoots up memory.


There is a method in Core Foundation that only get's the keys, which I plan to use.

CFArrayRef CFPreferencesCopyKeyList(CFStringRef applicationID, CFStringRef userName, CFStringRef hostName);


I need help with the arguments.


applicationID is the App Group bundle identifier.


What should be used for

userName - kCFPreferencesCurrentUser or kCFPreferencesAnyUser

hostName - kCFPreferencesCurrentHost or kCFPreferencesAnyHost


Thanks in advance

CFPreferencesCopyKeyList for App Group
 
 
Q