@@ -31,9 +31,9 @@ export class IOSProjectService extends projectServiceBaseLib.PlatformProjectServ
31
31
private $iOSEmulatorServices : Mobile . IEmulatorPlatformServices ,
32
32
private $options : IOptions ,
33
33
private $injector : IInjector ,
34
- private $projectDataService : IProjectDataService ,
34
+ $projectDataService : IProjectDataService ,
35
35
private $prompter : IPrompter ) {
36
- super ( $fs , $projectData ) ;
36
+ super ( $fs , $projectData , $projectDataService ) ;
37
37
}
38
38
39
39
public get platformData ( ) : IPlatformData {
@@ -57,7 +57,6 @@ export class IOSProjectService extends projectServiceBaseLib.PlatformProjectServ
57
57
frameworkFilesExtensions : [ ".a" , ".framework" , ".bin" ] ,
58
58
frameworkDirectoriesExtensions : [ ".framework" ] ,
59
59
frameworkDirectoriesNames : [ "Metadata" , "metadataGenerator" , "NativeScript" , "internal" ] ,
60
- frameworkVersion : this . getFrameworkVersion ( "tns-ios" ) ,
61
60
targetedOS : [ 'darwin' ] ,
62
61
configurationFileName : "Info.plist" ,
63
62
configurationFilePath : path . join ( projectRoot , this . $projectData . projectName , this . $projectData . projectName + "-Info.plist" ) ,
@@ -67,8 +66,7 @@ export class IOSProjectService extends projectServiceBaseLib.PlatformProjectServ
67
66
68
67
public getAppResourcesDestinationDirectoryPath ( ) : IFuture < string > {
69
68
return ( ( ) => {
70
- this . $projectDataService . initialize ( this . $projectData . projectDir ) ;
71
- let frameworkVersion = this . $projectDataService . getValue ( this . platformData . frameworkPackageName ) . wait ( ) [ "version" ] ;
69
+ let frameworkVersion = this . getFrameworkVersion ( this . platformData . frameworkPackageName ) . wait ( ) ;
72
70
73
71
if ( semver . lt ( frameworkVersion , "1.3.0" ) ) {
74
72
return path . join ( this . platformData . projectRoot , this . $projectData . projectName , "Resources" , "icons" ) ;
@@ -159,7 +157,8 @@ export class IOSProjectService extends projectServiceBaseLib.PlatformProjectServ
159
157
}
160
158
161
159
// 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" ) ) {
160
+ let frameworkVersion = this . getFrameworkVersion ( this . platformData . frameworkPackageName ) . wait ( ) ;
161
+ if ( semver . lt ( frameworkVersion , "1.4.0" ) ) {
163
162
basicArgs . push ( "-xcconfig" , path . join ( projectRoot , this . $projectData . projectName , "build.xcconfig" ) ) ;
164
163
}
165
164
0 commit comments