AVRoutePickerView doesn't show system route alert

Hello, I set a AVRoutePickerView in app, when I press the routePickerView, it shows nothing, I don't know what's wrong with my project. By the way, when I press MPVolumeView ,it can shows the system route alert picker. Anyone can help?

Replies

Did you ever find a solution? running into the same issue here

This happened to me and it was because I hadn't set the frame on the AVRoutePickerView:

let routePickerView = AVRoutePickerView()

But it showed up as soon as I gave it a frame (in this case from the outlet to my UIView):

let routePickerView = AVRoutePickerView(frame: routePickerButton.bounds)