在iOS App中显示播放列表文件夹 [英] Show Playlist-folder in iOS App

查看:345
本文介绍了在iOS App中显示播放列表文件夹的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

iTunes 我可以创建播放列表播放列表 - 文件夹。在此文件夹中,我可以创建一个或多个播放列表。
现在我尝试在我的iOS应用程序中从 iTunes 获取所有播放列表和播放列表文件夹。我使用 MPMediaQuery 来获取所有播放列表。我将我的播放列表文件夹作为自己的播放列表。这些项目都是此文件夹中所有播放列表的所有歌曲。

In iTunes I can create playlists and playlist-Folder. In this Folder i can create one or more playlists. Now I try to get all playlist and playlist-folder from iTunes in my iOS Application. I Use MPMediaQuery to get all playlists. I get my Playlist-folder as a own playlist. The items are all songs of all playlists in this folder.

我发现不是一个可以检查我的播放列表是否为文件夹的属性。

I found not a property with which I can check whether my playlist is a folder.

是否可以在我的iOS应用程序中从iTunes获取播放列表文件夹?

Is it possible to get the playlist-folder from iTunes in my iOS Application?

推荐答案

@isFolder和@parentPersistentID都可以在iOS 9.3.5和10.1中返回有效值。 1。您应该使用 valueForProperty:方法,如下所示:

Both @"isFolder" and @"parentPersistentID" are able to return valid values in both iOS 9.3.5 and 10.1.1. You should use these with the valueForProperty: method like this:

[播放列表valueForProperty: @isFolder];

正如A.Matapolo在对OP的评论中所述,这些都是无证件属性,可能会消失或改变某点。

As A.Matapolo stated in the comment on the OP, these are undocumented properties and may disappear or change at some point.

看起来这些已经有很长时间了,至少自2012年以来一直没有记录:
检测设备上的iTunes播放列表文件夹

It looks like these have been available and undocumented for quite some time, at least since 2012: Detecting iTunes playlist folders on a device

我已向Apple提交了有关此问题的错误报告。我将更新Open Radar: https://openradar.appspot.com/radar?id=5037312413007872

I've submitted a bug report to Apple about this. I will update on Open Radar: https://openradar.appspot.com/radar?id=5037312413007872

这篇关于在iOS App中显示播放列表文件夹的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆