-(void)artworkImages{
NSArray *noOfSongs = [mySongsArray content];
for (int i=0; i<[noOfSongs count]; i++) {
NSDictionary *dic = [[NSDictionary alloc] init];
dic = [[mySongsArray arrangedObjects] objectAtIndex:i];
NSURL *url = [NSURL fileURLWithPath:[dic objectForKey:@"Path"]];
AVURLAsset *asset = [AVURLAsset URLAssetWithURL:url options:nil];
for (NSString *format in [asset availableMetadataFormats]) {
for (AVMetadataItem *item in [asset metadataForFormat:format]) {
if (i>240 && i<250) {
NSBeginAlertSheet(@"Check the loop", @"Delete", nil, @"Cancel", window, self, @selector(alertEnd:returnCode:cInfo:), NULL, nil, @"format===%@,%d",format);
}
}
}
}
}
Above methods is working fine if I run the project by Code (X code), but getting issue if I run by build. I am importing songs from iTunes library.xml, after that I am storing into NSArrayController
. Here in this method I am trying to fetch artwork images but if I run by build I am getting around 250 images out of 400.