@@ -498,24 +498,23 @@ export class IOSProjectService extends projectServiceBaseLib.PlatformProjectServ
498498 }
499499
500500 private async addFramework ( frameworkPath : string , projectData : IProjectData ) : Promise < void > {
501- this . validateFramework ( frameworkPath ) ;
501+ if ( ! this . $hostInfo . isWindows ) {
502+ this . validateFramework ( frameworkPath ) ;
502503
503- let project = this . createPbxProj ( projectData ) ;
504- let frameworkName = path . basename ( frameworkPath , path . extname ( frameworkPath ) ) ;
505- let frameworkBinaryPath = path . join ( frameworkPath , frameworkName ) ;
506- const pathToFileCommand = this . $hostInfo . isWindows ? path . join ( __dirname , ".. ", ".." , "vendor" , "file" , "file.exe" ) : "file" ;
507- let isDynamic = _ . includes ( ( await this . $childProcess . spawnFromEvent ( pathToFileCommand , [ frameworkBinaryPath ] , "close" ) ) . stdout , "dynamically linked" ) ;
504+ let project = this . createPbxProj ( projectData ) ;
505+ let frameworkName = path . basename ( frameworkPath , path . extname ( frameworkPath ) ) ;
506+ let frameworkBinaryPath = path . join ( frameworkPath , frameworkName ) ;
507+ let isDynamic = _ . includes ( ( await this . $childProcess . spawnFromEvent ( "file ", [ frameworkBinaryPath ] , "close" ) ) . stdout , "dynamically linked" ) ;
508+ let frameworkAddOptions : IXcode . Options = { customFramework : true } ;
508509
509- let frameworkAddOptions : IXcode . Options = { customFramework : true } ;
510+ if ( isDynamic ) {
511+ frameworkAddOptions [ "embed" ] = true ;
512+ }
510513
511- if ( isDynamic ) {
512- frameworkAddOptions [ "embed" ] = true ;
514+ let frameworkRelativePath = '$(SRCROOT)/' + this . getLibSubpathRelativeToProjectPath ( frameworkPath , projectData ) ;
515+ project . addFramework ( frameworkRelativePath , frameworkAddOptions ) ;
516+ this . savePbxProj ( project , projectData ) ;
513517 }
514-
515- let frameworkRelativePath = '$(SRCROOT)/' + this . getLibSubpathRelativeToProjectPath ( frameworkPath , projectData ) ;
516- project . addFramework ( frameworkRelativePath , frameworkAddOptions ) ;
517- this . savePbxProj ( project , projectData ) ;
518-
519518 }
520519
521520 private async addStaticLibrary ( staticLibPath : string , projectData : IProjectData ) : Promise < void > {
0 commit comments