Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(cli): move xcodeproj/xcworkspace to config (#4032)
- Loading branch information
Showing
6 changed files
with
39 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,9 @@ | ||
import open from 'open'; | ||
|
||
import c from '../colors'; | ||
import { wait } from '../common'; | ||
import type { Config } from '../definitions'; | ||
import { fatal } from '../errors'; | ||
|
||
import { findXcodePath } from './common'; | ||
|
||
export async function openIOS(config: Config): Promise<void> { | ||
const xcodeProject = await findXcodePath(config); | ||
|
||
if (!xcodeProject) { | ||
fatal( | ||
'Xcode workspace does not exist.\n' + | ||
`Run ${c.input('npx cap add ios')} to bootstrap a new iOS project.`, | ||
); | ||
} | ||
|
||
await open(xcodeProject, { wait: false }); | ||
await open(await config.ios.nativeXcodeWorkspaceDirAbs, { wait: false }); | ||
await wait(3000); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters