From 10a4f0e4de63b5db00c070b6c6660a08d51093ef Mon Sep 17 00:00:00 2001 From: Chenglin Liu Date: Mon, 4 Nov 2024 11:46:05 -0800 Subject: [PATCH] Refactor deprecated keyWindow api in UIDSnapshot.m Summary: Refactor the use of the deprecated `keyWindow` property in ../xplat/sonar/iOS/Plugins/FlipperKitUIDebuggerPlugin/FlipperKitUIDebuggerPlugin/Utilities/UIDSnapshot.m to avoid app review rejection. Reviewed By: ingridwang Differential Revision: D65429199 fbshipit-source-id: 81920edc730c72528c22870bb8971be5d7104711 --- .../FlipperKitUIDebuggerPlugin/Utilities/UIDSnapshot.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/iOS/Plugins/FlipperKitUIDebuggerPlugin/FlipperKitUIDebuggerPlugin/Utilities/UIDSnapshot.m b/iOS/Plugins/FlipperKitUIDebuggerPlugin/FlipperKitUIDebuggerPlugin/Utilities/UIDSnapshot.m index 8a3beab7b25..c2806ebd8b4 100644 --- a/iOS/Plugins/FlipperKitUIDebuggerPlugin/FlipperKitUIDebuggerPlugin/Utilities/UIDSnapshot.m +++ b/iOS/Plugins/FlipperKitUIDebuggerPlugin/FlipperKitUIDebuggerPlugin/Utilities/UIDSnapshot.m @@ -31,8 +31,8 @@ // like in Split View on an iPad, the running application is // not using the entire screen thus the snapshot stretches to // fill the screen size which is incorrect. - if (application.keyWindow) { - size = application.keyWindow.bounds.size; + if (application.delegate.window) { + size = application.delegate.window.bounds.size; } UIGraphicsImageRenderer* renderer =