I'll take a punt that you haven't allocated unsortedArray
. Try:
self.unsortedArray = [NSMutableArray array];
[self.unsortedArray addObject:storedServices.aCustomServices1];
[self.unsortedArray addObject:storedServices.aCustomServices2];
This assumes you have unsortedArray
getter/setter methods that conform to normal MRR memory management practices. This is as simple as using @synthesize unsortedArray
(although newer versions of clang do this for you, I'd still explicitly add it).
Note that:
self.unsortedArray = [NSMutableArray array];
Should be in your init
method.