79366631

Date: 2025-01-18 06:06:46
Score: 0.5
Natty:
Report link
let connectedScenes = UIApplication.shared.connectedScenes
let windowScene = connectedScenes.first(where: { $0.activationState == .foregroundActive }) as? UIWindowScene
let window = windowScene?.keyWindow

This worked well for me.

Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Bhadresh Radadiya