I’m grouping my UserDefault keys by specific prefixes.
e.g.
[NSUserDefaults standardUserDefaults] setInteger: 1 forKey: @"prefix1_someText_Key"]
[NSUserDefaults standardUserDefaults] setInteger: 2 forKey: @"prefix2_someText_Key"]
[NSUserDefaults standardUserDefaults] setInteger: 3 forKey: @"prefix4_someText_Key"]
//.....
Now, I’d like to find all the keys, that start with e.g. “prefix”, and load them into an array. is there a way for doing that (programmatically)?
You could use the underlying NSDictionary to find the suitable keys:
UPDATE
For debugging reasons you could add a log to see what keys are being dropped: