Skip to content

Commit

Permalink
【iOS】Fix release pod verification issue.
Browse files Browse the repository at this point in the history
  • Loading branch information
Tangjianing authored and AbySwifter committed Jun 12, 2024
1 parent 643d6a5 commit 0d06a0d
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions iOS/TUIRoomKit/Source/View/Page/RoomRouter.swift
Original file line number Diff line number Diff line change
Expand Up @@ -237,13 +237,18 @@ class RoomRouter: NSObject {
}

class func getCurrentWindow() -> UIWindow? {
if let windowScene = UIApplication.shared.connectedScenes.first as? UIWindowScene {
if let keyWindow = windowScene.windows.first {
return keyWindow
}
var windows: [UIWindow]
if #available(iOS 13.0, *), let windowScene = UIApplication.shared.connectedScenes.first as? UIWindowScene {
windows = windowScene.windows
} else {
windows = UIApplication.shared.windows
}
if let keyWindow = windows.first(where: { $0.isKeyWindow }) {
return keyWindow
} else {
return windows.last(where: { $0.windowLevel == .normal && $0.isHidden == false &&
CGRectEqualToRect($0.bounds , UIScreen.main.bounds) })
}
return UIApplication.shared.windows.first(where: { $0.windowLevel == .normal && $0.isHidden == false &&
CGRectEqualToRect($0.bounds , UIScreen.main.bounds )})
}

func initializeNavigationController(rootViewController: UIViewController) {
Expand Down

0 comments on commit 0d06a0d

Please sign in to comment.