Search code examples
iosmpmediapickercontroller

Ios 8.4 MPMediaPickerController no longer displays AudioBooks


This question is similar to one asking about Podcasts for ios 8.4 and I believe it may be a similar issue but affecting audiobooks - since Audiobooks were moved to iBooks from Music in 8.4 it may however be different.

Prior to iOS 8.4, this code was allowing me to select an audiobook from my phone:

MPMediaPickerController *picker = [[MPMediaPickerController alloc] initWithMediaTypes: MPMediaTypeAudioBook];

NOTE this also seems to affect Podcasts.

With 8.4 and now in 9.0, the same code now pulls up an empty page. In addition, audiobooks were also able to be imported via:

MPMediaPickerController *picker = [[MPMediaPickerController alloc] initWithMediaTypes: MPMediaTypeAnyAudio];

However even with MPMediaTypeAnyAudio specified, no audiobooks are able to be shown. I know Apple Music was released in 8.4 and Audiobooks were moved from the core Music app to the iBooks app - so I'm assuming Apple completely redid their MPMediaPickerController.

I can't find anything about this in their changelogs though. And the documentation for MPMediaPickerController still points to an enum list of media types that clearly includes audiobooks - https://developer.apple.com/library/ios/documentation/MediaPlayer/Reference/MPMediaItem_ClassReference/index.html#//apple_ref/c/tdef/MPMediaType

Is it no longer possible to select an Audiobook from the phone with MPMediaPickerController?

It seems strange that apple would remove the ability to access it, without updating the documentation, am I simply just doing something wrong, are there new options that need to be set?


Solution

  • Is it no longer possible to select an Audiobook from the phone with MPMediaPickerController

    Yes, it is no longer possible. Starting in iOS 8.4, as you rightly say, Apple moved control of audio books to the iBooks app. Thus are no longer in the purview of the music app, so they don't show up in the media picker controller.

    (This broke my app too.)