-1

Using an instance of MPMediaPickerController to grab a song as background music to an app I am making. Works great but whenever the search function within the MediaPicker is used, it causes a lag in its presentation every time it is opened after. (The lag persists through closing/restarting app, only restarting phone removes it). And the following error message is printed every time the MediaPicker is presented:

<MPRemoteMediaPickerController: 0x15c1fe00> timed out waiting for fence barrier from com.apple.MusicUIService

I can scroll through/select songs no problem, but once a search query is entered the lag during presentation will begin.

The code to present the view controller:

rootView?.presentViewController(picker, animated: true, completion: { () -> Void in
    picker = nil
})

rootView is the current view's (an SKScene) ViewController that I use to present the MPMediaPicker and act as delegate. Haven't been able to get around this bug, so was curious if it was possible to just remove the search bar entirely.

vinchenzio
  • 76
  • 5

1 Answers1

0

so was curious if it was possible to just remove the search bar entirely

It isn't possible to customize MPMediaPickerController at all. If it is doing something troublesome, file a bug report.

However, I have two positive suggestions:

  • Set the picker's showsCloudItems to false.

  • It sounds like you are using just one media picker controller instance. Don't do that. Recreate the instance as a new media picker controller every time it is to be summoned.

matt
  • 515,959
  • 87
  • 875
  • 1,141
  • That's frustrating, and yea I just submitted one. And thank you for the suggestions! But already have both those in effect. Don't show cloud items and I instantiate a new picker controller each time the method that triggers the presentation is called. – vinchenzio Aug 23 '15 at 03:12