Enable limited use of iOS devices on non Mac devices

Summary:
Context: https://fb.workplace.com/groups/flippersupport/permalink/1005193786627946/

I believe we can land this without knowing that it works, because iOS support is still disabled by default for non mac devices - you have to enable it in settings to switch it on.

Reviewed By: passy

Differential Revision: D24893757

fbshipit-source-id: c9db515a7807c94a0d5e509017dd4e1796d24f6d
This commit is contained in:
John Knox
2020-11-17 04:02:12 -08:00
committed by Facebook GitHub Bot
parent 07212ec8e0
commit 41c7e023a9
3 changed files with 4 additions and 8 deletions

View File

@@ -172,7 +172,6 @@ class SettingsSheet extends Component<Props, State> {
<ToggledSection
label="iOS Developer"
toggled={enableIOS && this.props.platform === 'darwin'}
frozen={this.props.platform !== 'darwin'}
onChange={(v) => {
this.setState({
updatedSettings: {...this.state.updatedSettings, enableIOS: v},
@@ -186,7 +185,9 @@ class SettingsSheet extends Component<Props, State> {
)}
{this.props.platform !== 'darwin' && (
<ConfigText
content={'iOS development is only supported on MacOS'}
content={
'iOS development has limited functionality on non-MacOS devices'
}
/>
)}
<ToggledSection

View File

@@ -264,10 +264,6 @@ export async function getActiveDevicesAndSimulators(
}
export default (store: Store, logger: Logger) => {
// monitoring iOS devices only available on MacOS.
if (process.platform !== 'darwin') {
return;
}
if (!store.getState().settingsState.enableIOS) {
return;
}

View File

@@ -17,8 +17,7 @@ export async function listDevices(store: Store): Promise<Array<BaseDevice>> {
const androidDevices = state.settingsState.enableAndroid
? await getActiveAndroidDevices(store)
: [];
const iOSDevices: BaseDevice[] = state.application
.xcodeCommandLineToolsDetected
const iOSDevices: BaseDevice[] = state.settingsState.enableIOS
? await getActiveDevicesAndSimulators(store)
: [];
return [...androidDevices, ...iOSDevices];