When I try to create the NSArray purchasedTimeArray, I get a crash EXC_BAD_ACCESS
NSString *blank = @"";
NSArray *purchasedTimeArray = [[NSArray alloc] initWithObjects:
timeRemainingTitle, blank, @"imagename.png", blank, description, 4, nil];
And yes, timeRemainingTitle and description still exist in memory. They are both NSStrings.
Use the new Objective-C syntax:
Two benefits:
nilterminator and if one of the other values arenilin value, all the objects still end up in the array.As noted in the comments, the
@4syntax translates to[NSNumber numberWithInt:4].