我试图在越狱的 iPhone 上的 iTunes 目录中获取自定义铃声的名称。我可以成功列出自定义铃声,但它们重新显示为HWYH1.m4r
,这是 iTunes 重命名文件的原因,但我知道有一种方法可以破译歌曲的实际名称。
NSMutableDictionary *custDict = [[NSMutableDictionary alloc] initWithContentsOfFile:@"/iPhoneOS/private/var/mobile/Media/iTunes_Control/iTunes/Ringtones.plist"];
NSMutableDictionary *dictionary = [custDict objectForKey:@"Ringtones"];
NSMutableArray *customRingtone = [[dictionary objectForKey:@"Name"] objectAtIndex:indexPath.row];
NSLog(@"name: %@",[customRingtone objectAtIndex:indexPath.row]);
cell.textLabel.text = [customRingtone objectAtIndex:indexPath.row];
dictionary
正在返回:
"YBRZ.m4r" =
{
GUID = 17A52A505A42D076;
Name = "Wild West";
"Total Time" = 5037;
};
cell.textLabel.text
正在返回:name: (null)