@@ -23,7 +23,7 @@ export class IOSProjectService extends projectServiceBaseLib.PlatformProjectServ
2323 return this . $injector . resolve ( "npmInstallationManager" ) ;
2424 }
2525
26- constructor ( private $projectData : IProjectData ,
26+ constructor ( $projectData : IProjectData ,
2727 $fs : IFileSystem ,
2828 private $childProcess : IChildProcess ,
2929 private $errors : IErrors ,
@@ -33,7 +33,7 @@ export class IOSProjectService extends projectServiceBaseLib.PlatformProjectServ
3333 private $injector : IInjector ,
3434 private $projectDataService : IProjectDataService ,
3535 private $prompter : IPrompter ) {
36- super ( $fs ) ;
36+ super ( $fs , $projectData ) ;
3737 }
3838
3939 public get platformData ( ) : IPlatformData {
@@ -57,6 +57,7 @@ export class IOSProjectService extends projectServiceBaseLib.PlatformProjectServ
5757 frameworkFilesExtensions : [ ".a" , ".framework" , ".bin" ] ,
5858 frameworkDirectoriesExtensions : [ ".framework" ] ,
5959 frameworkDirectoriesNames : [ "Metadata" , "metadataGenerator" , "NativeScript" , "internal" ] ,
60+ frameworkVersion : this . getFrameworkVersion ( "tns-ios" ) ,
6061 targetedOS : [ 'darwin' ] ,
6162 configurationFileName : "Info.plist" ,
6263 configurationFilePath : path . join ( projectRoot , this . $projectData . projectName , this . $projectData . projectName + "-Info.plist" ) ,
@@ -157,10 +158,14 @@ export class IOSProjectService extends projectServiceBaseLib.PlatformProjectServ
157158 basicArgs . push ( "-target" , this . $projectData . projectName ) ;
158159 }
159160
161+ // Starting from tns-ios 1.4 the xcconfig file is referenced in the project template
162+ if ( semver . lt ( this . platformData . frameworkVersion , "1.4.0" ) ) {
163+ basicArgs . push ( "-xcconfig" , path . join ( projectRoot , this . $projectData . projectName , "build.xcconfig" ) ) ;
164+ }
165+
160166 let args : string [ ] = [ ] ;
161167 if ( this . $options . forDevice ) {
162168 args = basicArgs . concat ( [
163- "-xcconfig" , path . join ( projectRoot , this . $projectData . projectName , "build.xcconfig" ) ,
164169 "-sdk" , "iphoneos" ,
165170 'ARCHS=armv7 arm64' ,
166171 'VALID_ARCHS=armv7 arm64' ,
0 commit comments