Enable / Disable iOS support depending on xcode-select
Summary: Queries xcode-select on ios dispatcher startup, to see if it's installed. If it is, carry on with the ios device tracking, if not, don't bother. This should stop it from emitting errors trying to track devices when things aren't installed. I think it should also stop those install prompts from popping up. Sets it in app state so we can tell the user about it, and maybe gate some other things too. Reviewed By: passy Differential Revision: D17830696 fbshipit-source-id: 960d09a9c5267afabf5e5e222379a0a7ed2cc444
This commit is contained in:
committed by
Facebook Github Bot
parent
68881f35fc
commit
ea5079ff9c
@@ -76,6 +76,7 @@ export type State = {
|
||||
launcherMsg: LauncherMsg;
|
||||
flipperRating: number | null;
|
||||
statusMessages: Array<string>;
|
||||
xcodeCommandLineToolsDetected: boolean;
|
||||
};
|
||||
|
||||
type BooleanActionType =
|
||||
@@ -140,6 +141,12 @@ export type Action =
|
||||
| {
|
||||
type: 'REMOVE_STATUS_MSG';
|
||||
payload: {msg: string; sender: string};
|
||||
}
|
||||
| {
|
||||
type: 'SET_XCODE_DETECTED';
|
||||
payload: {
|
||||
isDetected: boolean;
|
||||
};
|
||||
};
|
||||
|
||||
export const initialState: () => State = () => ({
|
||||
@@ -161,6 +168,7 @@ export const initialState: () => State = () => ({
|
||||
},
|
||||
flipperRating: null,
|
||||
statusMessages: [],
|
||||
xcodeCommandLineToolsDetected: false,
|
||||
});
|
||||
|
||||
function statusMessage(sender: string, msg: string): string {
|
||||
@@ -268,6 +276,8 @@ export default function reducer(
|
||||
return {...state, statusMessages};
|
||||
}
|
||||
return state;
|
||||
} else if (action.type === 'SET_XCODE_DETECTED') {
|
||||
return {...state, xcodeCommandLineToolsDetected: action.payload.isDetected};
|
||||
} else {
|
||||
return state;
|
||||
}
|
||||
@@ -345,3 +355,8 @@ export const removeStatusMessage = (payload: StatusMessageType): Action => ({
|
||||
type: 'REMOVE_STATUS_MSG',
|
||||
payload,
|
||||
});
|
||||
|
||||
export const setXcodeDetected = (isDetected: boolean): Action => ({
|
||||
type: 'SET_XCODE_DETECTED',
|
||||
payload: {isDetected},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user