Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add tvOS 13 to if available checks in Presentation Manager #360

Merged
merged 3 commits into from
Jan 17, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Add tvOS 13 to if available checks
  • Loading branch information
frydiggity committed Jan 11, 2021
commit c063e3c5297e65513296816b7e806f6c05d78963
4 changes: 2 additions & 2 deletions Sources/Managers/PresentationManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ private extension PresentationManager {
private extension PresentationManager {
private func createWindow() -> UIWindow? {
var window = UIWindow()
if #available(iOS 13.0, *) {
if #available(iOS 13.0, tvOS 13.0, *) {
guard let windowScene = getFirstForegroundScene() else { return nil }
window = UIWindow(windowScene: windowScene)
} else {
Expand All @@ -243,7 +243,7 @@ private extension PresentationManager {
return window
}

@available(iOS 13.0, *)
@available(iOS 13.0, tvOS 13.0, *)
private func getFirstForegroundScene() -> UIWindowScene? {
let connectedScenes = UIApplication.shared.connectedScenes
if let windowActiveScene = connectedScenes.first(where: { $0.activationState == .foregroundActive }) as? UIWindowScene {
Expand Down