iOS 7 and the MPMediaPicker, why plus?

806 views Asked by At

I've got two strange diverging behaviours between iOS 6 and 7.

I want to present the MPMediaPicker to the end user, allow them to select 1 song, and start playing that back to them.

So, I show them the MPMediaPicker (/not/ multi, and /not/ cloud, if supported).

Two problems:

  • In iOS6, the first screen in MPMediaPicker shows the songs. In iOS7, it's the (empty) playlists. How can I force the MPMediaPicker to show songs as the default first screen? Is this just another example of Apple "knowing best"?
  • In iOS7 I get a red (+) symbol next to the media items in the list. What causes that? I haven't been able to turn up any references for that in google. What is the (+) symbol? It doesn't seem to highlight separately from the line in the table. The native media picker doesn't display this.

Thanks!

-Ken

Our MPMediaPicker code:

- (void)showSongPicker {
// TODO check if iOS 6
MPMediaPickerController* songPicker = [[MPMediaPickerController alloc] initWithMediaTypes:MPMediaTypeMusic];

songPicker.delegate = self;
songPicker.allowsPickingMultipleItems = NO;

songPicker.showsCloudItems = NO;

[self presentViewController:songPicker animated:YES completion:nil];

[self presentModalViewController:songPicker animated:YES];
}

#pragma mark MPMediaPickerControllerDelegate

- (void)mediaPicker: (MPMediaPickerController *)mediaPicker didPickMediaItems:(MPMediaItemCollection *)mediaItemCollection {
MPMediaItem* item = [mediaItemCollection.items objectAtIndex:0];

[self playMediaItem:item];

[self mediaPickerDidCancel:mediaPicker];
}

- (void)mediaPickerDidCancel:(MPMediaPickerController *)mediaPicker {
[self dismissViewControllerAnimated:YES completion:nil];
}
2

There are 2 answers

0
Felix Lapalme On

The + doesn't mean anything other than "Add this item to the picker selection"

0
Ken Corey On

Oh! I do apologise. I'd forgotten to answer this.

Since I didn't get an answer from anyone else (until just now, thanks, lap.felix), I filed it as a technical question with Apple.

Their answer? There's no programmatic way to affect the behaviour of the picker. If you need to change the behaviour this "drastically", you have to roll your own media picker.

So...yeah...thanks, Apple.

-Ken