From 40939e1ae557c9441f6caf8e2e312e6351b2f8b8 Mon Sep 17 00:00:00 2001 From: Lorenzo Blasa Date: Wed, 4 Oct 2023 05:37:12 -0700 Subject: [PATCH] Get MacOS dock icon Summary: The icon was not shown in the past as it was indefinitely bouncing on the dock. This is fixed now by asynchronously initiating the Node server process and then waiting until it becomes ready. Reviewed By: passy Differential Revision: D49907976 fbshipit-source-id: cdeaa578be42d9f5308e2e0df50872858b8248c3 --- .../Flipper.app/Contents/Info.plist | 2 -- .../Flipper.app/Contents/MacOS/Flipper | 7 ++++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/desktop/static/flipper-server-app-template/Flipper.app/Contents/Info.plist b/desktop/static/flipper-server-app-template/Flipper.app/Contents/Info.plist index 0e3b16a51..e505a7e2d 100644 --- a/desktop/static/flipper-server-app-template/Flipper.app/Contents/Info.plist +++ b/desktop/static/flipper-server-app-template/Flipper.app/Contents/Info.plist @@ -40,7 +40,5 @@ NSHighResolutionCapable - LSUIElement - diff --git a/desktop/static/flipper-server-app-template/Flipper.app/Contents/MacOS/Flipper b/desktop/static/flipper-server-app-template/Flipper.app/Contents/MacOS/Flipper index ec868cc74..53a3e18c9 100755 --- a/desktop/static/flipper-server-app-template/Flipper.app/Contents/MacOS/Flipper +++ b/desktop/static/flipper-server-app-template/Flipper.app/Contents/MacOS/Flipper @@ -6,4 +6,9 @@ SERVER_RESOURCES="$SCRIPT_PATH/../Resources/server" cd "$SERVER_RESOURCES" || exit 1 echo "Starting flipper-server ..." -"$NODE_PATH" . "$@" +"$NODE_PATH" . "$@" & + +# Wait for the Flipper HTTP server to start listening +while ! curl -s http://localhost:52342 > /dev/null; do + sleep 1 +done