@@ -72,43 +72,39 @@ pbxProject.prototype.generateUuid = function () {
7272 }
7373}
7474
75- pbxProject . prototype . addSourceFile = function ( path , opt ) {
75+ pbxProject . prototype . addPluginFile = function ( path , opt ) {
7676 var file = new pbxFile ( path , opt ) ;
7777
78- file . uuid = this . generateUuid ( ) ;
79- file . fileRef = this . generateUuid ( ) ;
8078 correctForPluginsPath ( file , this ) ;
79+ file . fileRef = this . generateUuid ( ) ;
8180
82- this . addToPbxBuildFileSection ( file ) ; // PBXBuildFile
8381 this . addToPbxFileReferenceSection ( file ) ; // PBXFileReference
8482 this . addToPluginsPbxGroup ( file ) ; // PBXGroup
85- this . addToPbxSourcesBuildPhase ( file ) ; // PBXSourcesBuildPhase
8683
8784 return file ;
8885}
8986
90- pbxProject . prototype . addHeaderFile = function ( path , opt ) {
91- var file = new pbxFile ( path , opt ) ;
87+ pbxProject . prototype . addSourceFile = function ( path , opt ) {
88+ var file = this . addPluginFile ( path , opt )
9289
93- file . fileRef = this . generateUuid ( ) ;
94- correctForPluginsPath ( file , this ) ;
90+ file . uuid = this . generateUuid ( ) ;
9591
96- this . addToPbxFileReferenceSection ( file ) ; // PBXFileReference
97- this . addToPluginsPbxGroup ( file ) ; // PBXGroup
92+ this . addToPbxBuildFileSection ( file ) ; // PBXBuildFile
93+ this . addToPbxSourcesBuildPhase ( file ) ; // PBXSourcesBuildPhase
9894
9995 return file ;
10096}
10197
98+ pbxProject . prototype . addHeaderFile = function ( path , opt ) {
99+ return this . addPluginFile ( path , opt )
100+ }
101+
102102pbxProject . prototype . addResourceFile = function ( path , opt ) {
103- var file = new pbxFile ( path , opt ) ;
103+ var file = this . addPluginFile ( path , opt )
104104
105105 file . uuid = this . generateUuid ( ) ;
106- file . fileRef = this . generateUuid ( ) ;
107- correctForPluginsPath ( file , this ) ;
108106
109107 this . addToPbxBuildFileSection ( file ) ; // PBXBuildFile
110- this . addToPbxFileReferenceSection ( file ) ; // PBXFileReference
111- this . addToPluginsPbxGroup ( file ) ; // PBXGroup
112108 this . addToPbxResourcesBuildPhase ( file ) ; // PBXResourcesBuildPhase
113109
114110 return file ;
0 commit comments