[경고대응] 'windows' was deprecated in iOS 15.0: Use UIWindowScene.windows on a relevant window scene instead
경고 문구
'windows' was deprecated in iOS 15.0: Use UIWindowScene.windows on a relevant window scene instead
[AS-IS]
guard let window = UIApplication.shared.windows.first else { return }
[To-Be]
let scenes = UIApplication.shared.connectedScenes
guard let windowScene = scenes.first as? UIWindowScene,
let window = windowScene.windows.first
else { return }