File tree Expand file tree Collapse file tree
packages/cli-platform-apple/src/commands/buildCommand Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -39,24 +39,25 @@ export function buildProject(
3939 args : BuildFlags ,
4040) : Promise < string > {
4141 return new Promise ( ( resolve , reject ) => {
42+ const simulatorDest = simulatorDestinationMap ?. [ platform ] ;
43+ if ( ! simulatorDest ) {
44+ reject (
45+ new CLIError (
46+ `Unknown platform: ${ platform } . Please, use one of: ${ Object . values (
47+ supportedPlatforms ,
48+ ) . join ( ', ' ) } .`,
49+ ) ,
50+ ) ;
51+ return ;
52+ }
53+
4254 const isDevice = args . device ;
4355 let destination = '' ;
4456 if ( udid ) {
4557 destination = `id=${ udid } ` ;
4658 } else if ( isDevice ) {
4759 destination = 'generic/platform=iOS' ;
4860 } else if ( mode === 'Debug' ) {
49- const simulatorDest = simulatorDestinationMap ?. [ platform ] ;
50- if ( ! simulatorDest ) {
51- reject (
52- new CLIError (
53- `Unknown platform: ${ platform } . Please, use one of: ${ Object . values (
54- supportedPlatforms ,
55- ) . join ( ', ' ) } .`,
56- ) ,
57- ) ;
58- return ;
59- }
6061 destination = `generic/platform=${ simulatorDest } ` ;
6162 } else {
6263 destination = `generic/platform=${ platform } ` ;
You can’t perform that action at this time.
0 commit comments