explicit instructions for idb

Summary: Add explicit instructions how to install idb internally

Reviewed By: LukeDefeo

Differential Revision: D51600754

fbshipit-source-id: c40d5d07c4cb570a7c51699ce0e4b8a67c506147
This commit is contained in:
Anton Kastritskiy
2023-11-28 03:40:23 -08:00
committed by Facebook GitHub Bot
parent 4e10bb1b43
commit 3b1763bd7d
2 changed files with 16 additions and 8 deletions

View File

@@ -7,8 +7,12 @@
* @format * @format
*/ */
export const getIdbInstallationInstructions = (idbPath: string) => export const getIdbInstallationInstructions = (
`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.`; idbPath: string,
): {message: string; commands: {title: string; command: string}[]} => ({
message: `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.`,
commands: [],
});
export const installXcode = export const installXcode =
'Install Xcode from the App Store or download it from https://developer.apple.com'; 'Install Xcode from the App Store or download it from https://developer.apple.com';

View File

@@ -288,13 +288,17 @@ export function getHealthchecks(): FlipperDoctor.Healthchecks {
const result = await tryExecuteCommand( const result = await tryExecuteCommand(
`${settings?.idbPath} --help`, `${settings?.idbPath} --help`,
); );
const hasProblem = result.hasProblem; if (result.hasProblem) {
const message = hasProblem
? getIdbInstallationInstructions(settings.idbPath)
: 'Flipper is configured to use your IDB installation.';
return { return {
hasProblem, hasProblem: true,
message, ...getIdbInstallationInstructions(settings.idbPath),
};
}
return {
hasProblem: false,
message:
'Flipper is configured to use your IDB installation.',
}; };
}, },
}, },