diff --git a/Sources/Donation/VLCDonationInvoicesViewController.m b/Sources/Donation/VLCDonationInvoicesViewController.m index 689653d64b6027923dac7d5e2d5c590dd1d5edda..845e8ce65a7aeeacf3b84378b7de0ba12a97d515 100644 --- a/Sources/Donation/VLCDonationInvoicesViewController.m +++ b/Sources/Donation/VLCDonationInvoicesViewController.m @@ -196,15 +196,6 @@ NSString * const VLCDonationInvoicesViewControllerReuseIdentifier = @"VLCDonatio - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { [tableView deselectRowAtIndexPath:indexPath animated:NO]; -#if TARGET_OS_IOS - if (indexPath.section == 0) { - VLCInvoice *invoice = _invoices[indexPath.row]; - [[UIApplication sharedApplication] openURL:invoice.hostedInvoiceURL options:@{} completionHandler:nil]; - } else { - VLCCharge *charge = _charges[indexPath.row]; - [[UIApplication sharedApplication] openURL:charge.receiptURL options:@{} completionHandler:nil]; - } -#else if (indexPath.section == 0) { VLCInvoice *invoice = _invoices[indexPath.row]; [[UIApplication sharedApplication] openURL:invoice.hostedInvoiceURL options:@{} completionHandler:nil]; @@ -212,7 +203,6 @@ NSString * const VLCDonationInvoicesViewControllerReuseIdentifier = @"VLCDonatio VLCCharge *charge = _charges[indexPath.row]; [[UIApplication sharedApplication] openURL:charge.receiptURL options:@{} completionHandler:nil]; } -#endif } @end diff --git a/Sources/Playback/Player/PlayerViewController.swift b/Sources/Playback/Player/PlayerViewController.swift index 721ca033bc1614557a5d52e7a3d0e617ca968fb8..c9fa9d1acd4ce09641f874372bcb91a370c2183d 100644 --- a/Sources/Playback/Player/PlayerViewController.swift +++ b/Sources/Playback/Player/PlayerViewController.swift @@ -1598,14 +1598,7 @@ extension PlayerViewController { commands.forEach { if $0.input == UIKeyCommand.inputRightArrow || $0.input == UIKeyCommand.inputLeftArrow { - ///UIKeyCommand.wantsPriorityOverSystemBehavior is introduced in iOS 15 SDK - ///but we actually still use Xcode 12.4 on CI. This old version only provides - ///SDK for iOS 14.4 max. Hence we use ObjC apis to call the method and still - ///have the ability to build with older Xcode versions. - let selector = NSSelectorFromString("setWantsPriorityOverSystemBehavior:") - if $0.responds(to: selector) { - $0.perform(selector, with: true) - } + $0.wantsPriorityOverSystemBehavior = true } } } diff --git a/Sources/Playback/Player/VideoPlayer-iOS/TitleSelectionView.swift b/Sources/Playback/Player/VideoPlayer-iOS/TitleSelectionView.swift index acfd9fc03d43bfcfd21b55453b45051eb2c5734f..9b472fb89ba8fe2078a641d7ea0cd24ba63377c9 100644 --- a/Sources/Playback/Player/VideoPlayer-iOS/TitleSelectionView.swift +++ b/Sources/Playback/Player/VideoPlayer-iOS/TitleSelectionView.swift @@ -205,14 +205,8 @@ private extension TitleSelectionView { private func setupTableViews() { if #available(iOS 15, *) { - // Workaround in order to be able to compile with an older SDK - let sectionHeaderTopPaddingSelector = NSSelectorFromString("setSectionHeaderTopPadding:") - if audioTableView.responds(to: sectionHeaderTopPaddingSelector) { - audioTableView.perform(sectionHeaderTopPaddingSelector, with: 0) - } - if subtitleTableView.responds(to: sectionHeaderTopPaddingSelector) { - subtitleTableView.perform(sectionHeaderTopPaddingSelector, with: 0) - } + audioTableView.sectionHeaderTopPadding = 0 + subtitleTableView.sectionHeaderTopPadding = 0 } audioTableView.tableFooterView = UIView(frame: CGRect(x: 0, y: 0, width: audioTableView.frame.size.width, height: 1))