@@ -33,11 +33,14 @@ export async function GetProjectDetails(credential: AppleCredential, xcodeVersio
3333 let projectPath = undefined ;
3434 const globber = await glob . create ( projectPathInput ) ;
3535 const files = await globber . glob ( ) ;
36+
3637 if ( ! files || files . length === 0 ) {
3738 throw new Error ( `No project found at: ${ projectPathInput } ` ) ;
3839 }
40+
3941 core . debug ( `Files found during search: ${ files . join ( ', ' ) } ` ) ;
4042 const excludedProjects = [ 'GameAssembly' , 'UnityFramework' , 'Pods' ] ;
43+
4144 for ( const file of files ) {
4245 if ( file . endsWith ( '.xcodeproj' ) ) {
4346 const projectBaseName = path . basename ( file , '.xcodeproj' ) ;
@@ -49,23 +52,28 @@ export async function GetProjectDetails(credential: AppleCredential, xcodeVersio
4952 break ;
5053 }
5154 }
55+
5256 if ( ! projectPath ) {
5357 throw new Error ( `Invalid project-path! Unable to find .xcodeproj in ${ projectPathInput } . ${ files . length } files were found but none matched.\n${ files . join ( ', ' ) } ` ) ;
5458 }
59+
5560 core . debug ( `Resolved Project path: ${ projectPath } ` ) ;
5661 await fs . promises . access ( projectPath , fs . constants . R_OK ) ;
5762 const projectDirectory = path . dirname ( projectPath ) ;
5863 core . info ( `Project directory: ${ projectDirectory } ` ) ;
5964 const projectName = path . basename ( projectPath , '.xcodeproj' ) ;
6065 const scheme = await getProjectScheme ( projectPath ) ;
6166 const platform = await getSupportedPlatform ( projectPath ) ;
67+
6268 core . info ( `Platform: ${ platform } ` ) ;
6369 if ( ! platform ) {
6470 throw new Error ( 'Unable to determine the platform to build for.' ) ;
6571 }
72+
6673 if ( platform !== 'macOS' ) {
6774 await checkSimulatorsAvailable ( platform ) ;
6875 }
76+
6977 let destination : string = core . getInput ( 'destination' ) ;
7078
7179 if ( ! destination ) {
@@ -76,9 +84,11 @@ export async function GetProjectDetails(credential: AppleCredential, xcodeVersio
7684 '-showDestinations' ,
7785 '-json'
7886 ] ;
87+
7988 if ( ! core . isDebug ( ) ) {
8089 core . info ( `[command]${ xcodebuild } ${ destinationArgs . join ( ' ' ) } ` ) ;
8190 }
91+
8292 await exec ( xcodebuild , destinationArgs , {
8393 listeners : {
8494 stdout : ( data : Buffer ) => {
@@ -87,10 +97,12 @@ export async function GetProjectDetails(credential: AppleCredential, xcodeVersio
8797 } ,
8898 silent : ! core . isDebug ( )
8999 } ) ;
100+
90101 const destinations = JSON . parse ( destinationOutput ) ;
91- core . debug ( `Available destinations: ${ JSON . stringify ( destinations , null , 2 ) } ` ) ;
102+ core . info ( `Available destinations: ${ JSON . stringify ( destinations , null , 2 ) } ` ) ;
103+
92104 if ( destinations . length === 0 ) {
93- throw new Error ( ' No available destinations found for the project!' ) ;
105+ throw new Error ( ` No available destinations found for the project!\n ${ destinationOutput } ` ) ;
94106 }
95107
96108 const nameMatch = 'Any visionOS Simulator Device' ;
0 commit comments