0xced / XCDYouTubeKit

YouTube video player for iOS, tvOS and macOS
MIT License
2.92k stars 626 forks source link

UIWebView API support to end in December 2020 #500

Closed aniketprakash closed 3 years ago

aniketprakash commented 3 years ago

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.

SoneeJohn commented 3 years ago

@aniketprakash XCDYouTubeKit does not make use of UIWebView.

medimnos commented 3 years ago

@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

SoneeJohn commented 3 years ago

@medimnos How are you integrating XCDYouTubeKit into your project?

medimnos commented 3 years ago

@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.

SoneeJohn commented 3 years ago

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