From 9bea015d5787577680899b58bfd82293610b80d6 Mon Sep 17 00:00:00 2001 From: Pascal Hartig Date: Tue, 14 Sep 2021 03:36:11 -0700 Subject: [PATCH] Update custom-ports.mdx (#2864) Summary: Pull Request resolved: https://github.com/facebook/flipper/pull/2864 Reviewed By: timur-valiev Differential Revision: D30930168 Pulled By: passy fbshipit-source-id: 9d2c580717183bbf2d762a30aa56fbcbe64672b1 --- docs/custom-ports.mdx | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/docs/custom-ports.mdx b/docs/custom-ports.mdx index 55f2048db..3217ee515 100644 --- a/docs/custom-ports.mdx +++ b/docs/custom-ports.mdx @@ -13,7 +13,13 @@ Each of these can be overridden by setting an environment variable, with the for To run the desktop app using custom ports: ``` -FLIPPER_PORTS=1111,2222 ./flipper +env FLIPPER_PORTS=1111,2222 ./flipper +``` + +or with a dev build: + +``` +env FLIPPER_PORTS=1111,2222 yarn start ``` To configure the Android SDK for custom ports, set the `flipper.ports` prop to your chosen ports `1111,2222` like so, and then launch the Android app: @@ -22,7 +28,11 @@ To configure the Android SDK for custom ports, set the `flipper.ports` prop to y adb shell su 0 setprop flipper.ports 1111,2222 ``` -To configure the iOS SDK for custom ports, set the FLIPPER_PORTS environment variable in your app launch script. +To configure the iOS SDK for custom ports, set the FLIPPER_PORTS environment variable in your app launch script or set it system-wide through User Defaults: + +``` +xcrun simctl spawn booted defaults write "Apple Global Domain" "com.facebook.flipper.ports" -string "1111,2222" +``` ## METRO SERVER PORTS