I am having an issue for the following method in my AppDelegate.
- (void)itemDiscovered:(PodcastShow *)show
{
NSLog(@"%@", show);
NSArray* newArray = [self.showArray arrayByAddingObject:show];
self.showArray = (NSMutableArray*)newArray; //This line signals SIGABRT
}
I’m a fairly new with ARC and Objective-C in general. Obviously, there is a memory issue, but I don’t know what I’m doing wrong. I’ve written a ton of code just like this and I’ve never come across an issue like this. Here is the showArray property:
@property (strong, nonatomic) NSMutableArray *showArray;
Any help would be greatly appreciated.
Try
[self.showArray addObjectsFromArray:newArray]or[self.showArray addObject:show].Also be sure that you are creating the mutable array by calling
self.showArray = [NSMutableArray array](or something similar) somewhere in your code.