Is it possible to simulate multiple audio outputs for the iPhone and/or the simulator?
I have the following code, but it doesn't display the route button.
MPVolumeView *volumeView = [[MPVolumeView alloc] initWithFrame:CGRectZero];
volumeView.showsRouteButton = YES开发者_StackOverflow中文版;
volumeView.showsVolumeSlider = NO;
[volumeView sizeToFit];
[self.view addSubview:volumeView];
[volumeView release];
In the documentation I read:
The route button is visible by default when there is more than one audio output route available.
I only have one audio output, so the button doesn't show. Is there any way to simulate multiple audio outputs so that I can test this button?
You can use AirPlayer (a Mac Application) to simulate an Apple TV. This should cause the AirPlay button to appear in the simulator. Although it claims to not work with audio, the AirPlay button may still show up.
Since some time has past and I still haven't gotten any correct answers, I thought I would share how to solve this problem without buying an Apple TV or other air play device.
The way I solved it was simply to use a bluetooth headset, which costs much less than an Apple TV.
Another suggested way to solve it is to use AirView on another iOS device. I haven't tested this, but judging from the comments it doesn't support sound, so I don't think it works.
I intend to accept this as my answer, but I will change my accept if anyone finds a real way to simulate multiple audio outputs.
精彩评论