I am building a music player app and my .mp3 files come from the /Documents directiory in iOS 11. Thing is that I found out after a research how to read those files from the folder.
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *documentsPath = [paths objectAtIndex:0];
NSError *error;
NSArray *directoryContents = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:documentsPath error:&error];
NSLog(@"%@", directoryContents);
The above code gets the the file name which I will print out later in a UITableViewController
.
My issue is that now I dont know how to read the .mp3's metadata from the /Documents folder such as artist, or album artwork.