File tree Expand file tree Collapse file tree 1 file changed +33
-0
lines changed Expand file tree Collapse file tree 1 file changed +33
-0
lines changed Original file line number Diff line number Diff line change @@ -1872,6 +1872,39 @@ pbxProject.prototype.addLocalizationVariantGroup = function(name) {
18721872 return localizationVariantGroup ;
18731873} ;
18741874
1875+ pbxProject . prototype . addKnownRegion = function ( name ) {
1876+ if ( ! this . pbxProjectSection ( ) [ this . getFirstProject ( ) [ 'uuid' ] ] [ 'knownRegions' ] ) {
1877+ this . pbxProjectSection ( ) [ this . getFirstProject ( ) [ 'uuid' ] ] [ 'knownRegions' ] = [ ] ;
1878+ }
1879+ if ( ! this . hasKnownRegion ( name ) ) {
1880+ this . pbxProjectSection ( ) [ this . getFirstProject ( ) [ 'uuid' ] ] [ 'knownRegions' ] . push ( name ) ;
1881+ }
1882+ }
1883+
1884+ pbxProject . prototype . removeKnownRegion = function ( name ) {
1885+ var regions = this . pbxProjectSection ( ) [ this . getFirstProject ( ) [ 'uuid' ] ] [ 'knownRegions' ] ;
1886+ if ( regions ) {
1887+ for ( var i = 0 ; i < regions . length ; i ++ ) {
1888+ if ( regions [ i ] === name ) {
1889+ regions . splice ( i , 1 ) ;
1890+ break ;
1891+ }
1892+ }
1893+ this . pbxProjectSection ( ) [ this . getFirstProject ( ) [ 'uuid' ] ] [ 'knownRegions' ] = regions ;
1894+ }
1895+ }
1896+
1897+ pbxProject . prototype . hasKnownRegion = function ( name ) {
1898+ var regions = this . pbxProjectSection ( ) [ this . getFirstProject ( ) [ 'uuid' ] ] [ 'knownRegions' ] ;
1899+ if ( regions ) {
1900+ for ( var i in regions ) {
1901+ if ( regions [ i ] === name ) {
1902+ return true ;
1903+ }
1904+ }
1905+ }
1906+ return false ;
1907+ }
18751908
18761909pbxProject . prototype . getPBXObject = function ( name ) {
18771910 return this . hash . project . objects [ name ] ;
You can’t perform that action at this time.
0 commit comments