WARNING: AVF context unavailable for +[MRAVOutputContext sharedAudioPresentationContext]_block_invoke

Viewed 3612

I try to add volume adjust in my app with this code but not work properly warning given this.

@property (nonatomic, strong) MPVolumeView *volumeView;

_volumeView = [ [MPVolumeView alloc] init];
[_volumeView setShowsVolumeSlider:YES];
[_volumeView setShowsRouteButton:YES];
[_volumeView sizeToFit];
[self.view addSubview:_volumeView];

but this warning given

2018-11-05 15:55:14.898262+0530 BestBubby[7379:198945] [MediaRemote] [AVOutputContext] WARNING: AVF context unavailable for +[MRAVOutputContext sharedAudioPresentationContext]_block_invoke

2018-11-05 15:55:14.898488+0530 BestBubby[7379:198945] [MediaRemote] [AVOutputContext] WARNING: AVF context unavailable for +[MRAVOutputContext createOutputContextWithUniqueIdentifier:]
1 Answers

MPVolumeView can only be tested on the real device - on Simulator there will be "empty" view and mentioned warnings.

Related