i am adding values to NSUserDefaults at run time and making the keys as [NSString stringWithFormat:@"decrement%@",course_id];
i am setting the objects one by one is there any way i can get all the userdefaults object whose key start with “decrement”?
or i have to go in a loop and get object by making exact key one by one?
Note :- i accept down vote as an healthy way of criticism but do write the reason so that i can improve.
You can get all dictionary key of NSUserDefaults like this:
Now use NSPredicate for finding [NSString stringWithFormat:@”decrement%@”,course_id]; value in arrKeys