diff --git a/packages/react-native/React/CoreModules/RCTDevMenu.mm b/packages/react-native/React/CoreModules/RCTDevMenu.mm index 1a970a7d086952..0bbe2b2a7eb685 100644 --- a/packages/react-native/React/CoreModules/RCTDevMenu.mm +++ b/packages/react-native/React/CoreModules/RCTDevMenu.mm @@ -409,9 +409,15 @@ - (RCTDevMenuAlertActionHandler)alertActionHandlerForDevItem:(RCTDevMenuItem *__ { return ^(__unused UIAlertAction *action) { if (item) { +#if TARGET_OS_VISION + /// Execute this handler after the action sheet is dismissed to properly retrieve window when using SwiftUI entry point. + dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 0), dispatch_get_main_queue(), ^{ + [item callHandler]; + }); +#else [item callHandler]; +#endif } - self->_actionSheet = nil; }; }