From 55b7ef934cae8f7dbde0c2d28b9dc397ed43d71c Mon Sep 17 00:00:00 2001 From: Andrey Goncharov Date: Wed, 20 Jul 2022 06:03:38 -0700 Subject: [PATCH] Augument IDB installation instructions for intern users Reviewed By: passy Differential Revision: D37994214 fbshipit-source-id: bd36abf1ed024ca1f18fcc5297108e4ca333c578 --- .../src/fb-stubs/idbInstallationInstructions.tsx | 11 +++++++++++ desktop/doctor/src/index.tsx | 3 ++- 2 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 desktop/doctor/src/fb-stubs/idbInstallationInstructions.tsx diff --git a/desktop/doctor/src/fb-stubs/idbInstallationInstructions.tsx b/desktop/doctor/src/fb-stubs/idbInstallationInstructions.tsx new file mode 100644 index 000000000..cb326a3a8 --- /dev/null +++ b/desktop/doctor/src/fb-stubs/idbInstallationInstructions.tsx @@ -0,0 +1,11 @@ +/** + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + * @format + */ + +export const getIdbInstallationInstructions = (idbPath: string) => + `IDB is required to use Flipper with iOS devices. It can be installed from https://github.com/facebook/idb and configured in Flipper settings. You can also disable physical iOS device support in settings. Current setting: ${idbPath} isn't a valid IDB installation.`; diff --git a/desktop/doctor/src/index.tsx b/desktop/doctor/src/index.tsx index f36f5c916..b2f353d64 100644 --- a/desktop/doctor/src/index.tsx +++ b/desktop/doctor/src/index.tsx @@ -17,6 +17,7 @@ import * as fs from 'fs'; import * as path from 'path'; import type {FlipperDoctor} from 'flipper-common'; import * as fs_extra from 'fs-extra'; +import {getIdbInstallationInstructions} from './fb-stubs/idbInstallationInstructions'; export function getHealthchecks(): FlipperDoctor.Healthchecks { return { @@ -246,7 +247,7 @@ export function getHealthchecks(): FlipperDoctor.Healthchecks { ); const hasProblem = result.hasProblem; const message = hasProblem - ? `IDB is required to use Flipper with iOS devices. It can be installed from https://github.com/facebook/idb and configured in Flipper settings. You can also disable physical iOS device support in settings. Current setting: ${settings.idbPath} isn't a valid IDB installation.` + ? getIdbInstallationInstructions(settings.idbPath) : 'Flipper is configured to use your IDB installation.'; return { hasProblem,