diff --git a/desktop/app/src/devices/IOSDevice.tsx b/desktop/app/src/devices/IOSDevice.tsx index 992438183..21a388d00 100644 --- a/desktop/app/src/devices/IOSDevice.tsx +++ b/desktop/app/src/devices/IOSDevice.tsx @@ -56,7 +56,10 @@ export default class IOSDevice extends BaseDevice { const tmpImageName = uuid() + '.png'; const tmpDirectory = (electron.app || electron.remote.app).getPath('temp'); const tmpFilePath = path.join(tmpDirectory, tmpImageName); - const command = `xcrun simctl io booted screenshot ${tmpFilePath}`; + const command = + this.deviceType === 'emulator' + ? `xcrun simctl io booted screenshot ${tmpFilePath}` + : `idb screenshot --udid ${this.serial} ${tmpFilePath}`; return promisify(exec)(command) .then(() => promisify(fs.readFile)(tmpFilePath)) .then((buffer) => { diff --git a/desktop/app/src/init.tsx b/desktop/app/src/init.tsx index 1bf8f53c4..98d93cfb6 100644 --- a/desktop/app/src/init.tsx +++ b/desktop/app/src/init.tsx @@ -73,6 +73,7 @@ const AppFrame = () => ( function setProcessState(store: Store) { const settings = store.getState().settingsState; const androidHome = settings.androidHome; + const idbPath = settings.idbPath; if (!process.env.ANDROID_HOME) { process.env.ANDROID_HOME = androidHome; @@ -83,7 +84,9 @@ function setProcessState(store: Store) { process.env.PATH = ['emulator', 'tools', 'platform-tools'] .map((directory) => path.resolve(androidHome, directory)) - .join(':') + `:${process.env.PATH}`; + .join(':') + + `:${idbPath}` + + `:${process.env.PATH}`; window.requestIdleCallback(() => { setupPrefetcher(settings);