I have singleton where several classes and Threads are updating an NSMutableArray. But when access the NSMutableArray to see the content of the NSMutableArray is empty.
This is part of my code:
@property (strong, nonatomic) NSMutableArray *myArray;
-(NSMutableArray*) myArray{
if (_ myArray == nil) {
_myArray = [[NSMutableArray alloc]init];
}
return _myArray;
}
-(void)addToArray:(NSString*)myString{
[self.myArray addObject:myString];
}
Any of you knows why the NSMutableArrays always is empty?
I'll really appreciate your help