objective-c - How to fetch all subscribed Podcasts and not just downloaded ones, locally
问题描述
I'm building an import method from the native Apple Podcasts app into my own.
So I've been using a predicate to fetch MPMediaItems of type Podcast from the local device, however, this (As shown below) only shows downloaded episodes and not shows:
MPMediaPropertyPredicate *predicate = [MPMediaPropertyPredicate predicateWithValue:[NSNumber numberWithInteger:MPMediaTypePodcast] forProperty:MPMediaItemPropertyMediaType];
MPMediaQuery *query = [[MPMediaQuery alloc] init];
[query addFilterPredicate:predicate];
NSArray *items = [query items];
for (int i = 0; i<items.count;i++){
MPMediaItem * item = items[0];
NSLog(@"%@", [item podcastTitle]);
}
How do I fetch a users subscribed podcasts from their device using either a predicate or MusicKit?
解决方案
推荐阅读
- python - python pandas dict对象不可调用,解析json
- shell - 按列对文件内容进行排序
- sql - 如何选择只有 w10 兼容应用的机器和用户
- python - python中如何使用__add__方法添加稀疏向量
- angular - 如何突出显示 Ace Editor Angular 项目中的特定行?
- javascript - 建议实践:确保只有当某个条件发生时才需要调用一个promise,然后再继续
- html - 翻转卡自动高度?
- android - Google Play Console 中的应用与任何设备都不兼容
- mysql - 聚合函数具有
- html - 更改 MDC 按钮的容器填充颜色