expand on ios doctor suggestions

Summary:
this should help to address support posts like this one

https://fb.workplace.com/groups/flippersupport/posts/1724631861350798

Reviewed By: potomak

Differential Revision: D51203549

fbshipit-source-id: 097faeb6c9d506bc1fa2ac4602cba95e99a4e2cb
This commit is contained in:
Anton Kastritskiy
2023-11-10 09:54:08 -08:00
committed by Facebook GitHub Bot
parent 45157c3675
commit 0cbd640e5c
2 changed files with 13 additions and 3 deletions

View File

@@ -17,7 +17,11 @@ 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';
import {
getIdbInstallationInstructions,
installXcode,
installSDK,
} from './fb-stubs/ios';
import {validateSelectedXcodeVersion} from './fb-stubs/validateSelectedXcodeVersion';
export function getHealthchecks(): FlipperDoctor.Healthchecks {
@@ -144,7 +148,7 @@ export function getHealthchecks(): FlipperDoctor.Healthchecks {
run: async (e: FlipperDoctor.EnvironmentInfo) => {
const hasProblem = e.IDEs == null || e.IDEs.Xcode == null;
const message = hasProblem
? 'Xcode (https://developer.apple.com/xcode/) is not installed.'
? `Xcode is not installed. ${installXcode}.`
: `Xcode version ${e.IDEs.Xcode.version} is installed at "${e.IDEs.Xcode.path}".`;
return {
hasProblem,
@@ -207,7 +211,7 @@ export function getHealthchecks(): FlipperDoctor.Healthchecks {
!e.SDKs['iOS SDK'].Platforms ||
!e.SDKs['iOS SDK'].Platforms.length;
const message = hasProblem
? 'iOS SDK is not installed. You can install it using Xcode (https://developer.apple.com/xcode/).'
? `iOS SDK is not installed. ${installSDK}`
: `iOS SDK is installed for the following platforms: ${JSON.stringify(
e.SDKs['iOS SDK'].Platforms,
)}.`;