Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Getting error when trying to use AVPictureInPictureController in iOS 13 or tvOS 13

I have small app which runs on iOS and tvOS where I’m displaying a video in UIView.It does support iOS 12 and tvOS 12. Now want to show PIP for tvOS hence trying to use AVPictureInPictureController gives error “Use of undeclared identifier 'AVPictureInPictureController”.

Even though deployment target set to tvOS 13. In Xcode, capabilities -> Background mode -> enabled “ Audio,Airplay and Picture In Picture”. This basic code gives error.

#import <AVKit/AVKit.h>
if ([AVPictureInPictureController isPictureInPictureSupported]) {
   // code 
}

Any other settings missing or something else I need do ?

Thanks

like image 452
sia Avatar asked Oct 30 '19 07:10

sia


1 Answers

Not supported in tvOS, as stated in Apple's documentation

SDKs

iOS 9.0+

macOS 10.15+

Mac Catalyst 13.0+

like image 175
Toma Avatar answered Oct 23 '22 15:10

Toma