Skip to content

Commit

Permalink
Fix tvOS compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
vtourraine committed Sep 17, 2022
1 parent 828b716 commit 4db842a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Sources/AcknowList/AcknowListViewController.swift
Expand Up @@ -23,8 +23,12 @@

#if os(iOS) || os(tvOS)
import UIKit
#endif
#if os(iOS)
import SafariServices
#endif

#if os(iOS) || os(tvOS)
/// Subclass of `UITableViewController` that displays a list of acknowledgements.
@available(iOS 9.0.0, tvOS 9.0.0, *)
@available(iOSApplicationExtension, unavailable)
Expand Down Expand Up @@ -389,8 +393,10 @@ open class AcknowListViewController: UITableViewController {
}
else if canOpenRepository(for: acknowledgement),
let repository = acknowledgement.repository {
#if !os(tvOS)
let safariViewController = SFSafariViewController(url: repository)
present(safariViewController, animated: true)
#endif
}
}
}
Expand Down

0 comments on commit 4db842a

Please sign in to comment.