feat:remove dependency of ios-depoly, install this in progress

This commit is contained in:
pengfei.zhou 2021-12-07 17:15:54 +08:00 committed by osborn
parent 52ffe8d80c
commit 3b4f0fe0fe
4 changed files with 10 additions and 11 deletions

View File

@ -24,8 +24,5 @@
"@rollup/plugin-image": "^2.0.5", "@rollup/plugin-image": "^2.0.5",
"@rollup/plugin-json": "^4.1.0", "@rollup/plugin-json": "^4.1.0",
"@rollup/plugin-node-resolve": "^8.4.0" "@rollup/plugin-node-resolve": "^8.4.0"
},
"optionalDependencies": {
"ios-deploy": "^1.11.4"
} }
} }

View File

@ -23,8 +23,5 @@
"@rollup/plugin-image": "^2.0.5", "@rollup/plugin-image": "^2.0.5",
"@rollup/plugin-json": "^4.1.0", "@rollup/plugin-json": "^4.1.0",
"@rollup/plugin-node-resolve": "^8.4.0" "@rollup/plugin-node-resolve": "^8.4.0"
},
"optionalDependencies": {
"ios-deploy": "^1.11.4"
} }
} }

View File

@ -23,8 +23,5 @@
"@rollup/plugin-image": "^2.0.5", "@rollup/plugin-image": "^2.0.5",
"@rollup/plugin-json": "^4.1.0", "@rollup/plugin-json": "^4.1.0",
"@rollup/plugin-node-resolve": "^8.4.0" "@rollup/plugin-node-resolve": "^8.4.0"
},
"optionalDependencies": {
"ios-deploy": "^1.11.4"
} }
} }

View File

@ -162,6 +162,15 @@ async function runiOS() {
console.log("Cannot find iOS device".red); console.log("Cannot find iOS device".red);
return; return;
} }
if (!selectedDevice.isSimulator) {
try {
await Shell.exec("ios-deploy", ["--version"])
} catch (e) {
console.log("Install ios-deploy first".green)
await Shell.exec("npm", ["install", "-g", "ios-deploy"])
}
}
console.log("Waiting for building".green); console.log("Waiting for building".green);
console.log("===================="); console.log("====================");
await Shell.exec("pod", ["install"], { await Shell.exec("pod", ["install"], {
@ -215,9 +224,8 @@ async function runiOS() {
await Shell.exec("xcrun", ["simctl", "install", selectedDevice.deviceId, iOSAPP]); await Shell.exec("xcrun", ["simctl", "install", selectedDevice.deviceId, iOSAPP]);
await Shell.exec("xcrun", ["simctl", "launch", selectedDevice.deviceId, bundleId || `pub.doric.ios.${scheme.toLowerCase()}`]); await Shell.exec("xcrun", ["simctl", "launch", selectedDevice.deviceId, bundleId || `pub.doric.ios.${scheme.toLowerCase()}`]);
} else { } else {
const iosDeploy = path.resolve("node_modules", ".bin", "ios-deploy")
await Shell.exec( await Shell.exec(
iosDeploy, "ios-deploy",
[ [
"--id", selectedDevice.deviceId, "--id", selectedDevice.deviceId,
"--justlaunch", "--justlaunch",