I have this code from which i am checking songs that are present in my app and storing the number of songs in an NSMUTABLEArray but there is something wrong it always shows null
for (int i = 1; i < 100; ++i) {
// Load the plist
NSString *plist = [[NSBundle mainBundle] pathForResource:[NSString stringWithFormat:@"%d",i] ofType:@"mp3"];
if (nil == plist) {
NSLog(@"not found (%i)", i);
continue;
}
NSLog(@"Found Songs (%i)",i);
[MYNSMUTABLEArray addObject:[NSNumber numberWithInt:i]];
NSLog(@"%@",MYNSMUTABLEArray);
}
the i variable is working absolutely fine