0xced / XCDYouTubeKit

YouTube video player for iOS, tvOS and macOS

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

UIWebView API support to end in December 2020

aniketprakash opened this issue · comments

The support for UIWebView will be completely removed from December 2020. So app updates that use UIWebView will no longer be accepted as of December 2020. It is better to migrate to WKWebView.

@aniketprakash XCDYouTubeKit does not make use of UIWebView.

@SoneeJohn XCDYouTubeKit does not use UIWebview but your tests does, VCRViewController.m file. Apple detects UIWebview usage in that file and send mail about deprecation;

ITMS-90809: Deprecated API Usage - App updates that use UIWebView will no longer be accepted as of December 2020. Instead, use WKWebView for improved security and reliability. Learn more (https://developer.apple.com/documentation/uikit/uiwebview).

Related file => https://github.com/0xced/XCDYouTubeKit/blob/master/XCDYouTubeKit%20Tests/VCRURLConnection/Examples/Example-iOS/Example-iOS/VCRViewController.m

@medimnos How are you integrating XCDYouTubeKit into your project?

@SoneeJohn I've just import with Swift Package Manager and I've used below the code;

let playerViewController = AVPlayerViewController()
self.present(playerViewController, animated: true, completion: nil)
XCDYouTubeClient.default().getVideoWithIdentifier(videoID) { (video, error) in
     if let streamUrl = (video?.streamURLs[XCDYouTubeVideoQuality.HD720.rawValue] ??
     video?.streamURLs[XCDYouTubeVideoQuality.medium360.rawValue] ??
                video?.streamURLs[XCDYouTubeVideoQuality.small240.rawValue]) {
                  playerViewController.player = AVPlayer(url: streamUrl)
                   playerViewController.player?.play()
      }else {
              self.dismiss(animated: true, completion: nil)
      }
 }

Everything perfectly normal, after that when I submit the binary to App Store, Apple sent to me message about UIWebview. Later when I search for this in my project I've found only one file related that. VCRViewController.m

Thanks.

@medimnos Can you try the branch SPM to see if that fixes the issue?