File tree Expand file tree Collapse file tree 4 files changed +18
-18
lines changed
Expand file tree Collapse file tree 4 files changed +18
-18
lines changed Original file line number Diff line number Diff line change @@ -175,14 +175,14 @@ - (NSArray *)extractBuildSettingsFromProject:(NSURL *)projectWrapperURL error:(N
175175 self.buildSettingsByTarget [self .validatedProjectConfigName] = projectSettings;
176176
177177 // Begin check that the project file has some settings
178- BOOL projectFileHasSettings = projectSettings.containsBuildSettings ;
178+ BOOL projectFileHasSettings = projectSettings.tps_containsBuildSettings ;
179179
180180 // Add project targets
181181 for (NSDictionary *target in targets) {
182182 NSString *targetName = target[@" name" ];
183183 buildConfigurationListID = target[@" buildConfigurationList" ];
184184 NSDictionary *targetSettings = [self buildSettingStringsByConfigurationForBuildConfigurationListID: buildConfigurationListID];
185- if (!projectFileHasSettings) { projectFileHasSettings = targetSettings.containsBuildSettings ; }
185+ if (!projectFileHasSettings) { projectFileHasSettings = targetSettings.tps_containsBuildSettings ; }
186186
187187 self.buildSettingsByTarget [targetName] = targetSettings;
188188
Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ extern NSErrorDomain const TPSBuildSettingExtractorErrorDomain;
3636// Assumes that a dictionary of build settings always has NSString values
3737// Returns NO if all the values in a dictionary are an empty string
3838// Raises an exception if used on a dictionary with any non-NSString value
39- - (BOOL )containsBuildSettings ;
39+ - (BOOL )tps_containsBuildSettings ;
4040
4141// Returns a new dictionary containing all entries in the receiver except for
4242// entries with an empty string value.
Original file line number Diff line number Diff line change @@ -56,20 +56,20 @@ - (NSString *)tps_baseBuildSettingName {
5656
5757@implementation NSDictionary (TPS_BuildSettingAdditions)
5858
59- - (BOOL )containsBuildSettings {
60- BOOL foundNonEmptyString = NO ;
61- for (id value in self.allValues ) {
62- if ([value isKindOfClass: [NSString class ]]) {
63- if (![(NSString *)value isEqualToString: @" " ]) {
64- foundNonEmptyString = YES ;
65- break ;
66- }
67- } else {
68- [NSException raise: (NSInternalInconsistencyException ) format: @" -containsBuildSetting is expected to be called on a dictionary with NSString values." ];
59+ - (BOOL )tps_containsBuildSettings {
60+ BOOL foundNonEmptyString = NO ;
61+ for (id value in self.allValues ) {
62+ if ([value isKindOfClass: [NSString class ]]) {
63+ if (![(NSString *)value isEqualToString: @" " ]) {
64+ foundNonEmptyString = YES ;
65+ break ;
6966 }
67+ } else {
68+ [NSException raise: (NSInternalInconsistencyException ) format: @" -containsBuildSetting is expected to be called on a dictionary with NSString values." ];
7069 }
71- return foundNonEmptyString;
7270 }
71+ return foundNonEmptyString;
72+ }
7373
7474- (NSDictionary *)tps_dictionaryByRemovingEmptyStringValues {
7575 NSMutableDictionary *temp = [[NSMutableDictionary alloc ] init ];
Original file line number Diff line number Diff line change @@ -41,17 +41,17 @@ - (void)testThreeBuildConfigurations
4141- (void )testDictionaryBuildSettingsCategory
4242{
4343 NSDictionary *dictionaryWithBuildSettings = @{ @" Shared" : @" COPY_PHASE_STRIP = NO" , @" Release" : @" COPY_PHASE_STRIP = NO" , @" Debug" : @" COPY_PHASE_STRIP = NO" };
44- XCTAssertTrue (dictionaryWithBuildSettings.containsBuildSettings );
44+ XCTAssertTrue (dictionaryWithBuildSettings.tps_containsBuildSettings );
4545
4646 NSDictionary *dictionaryWithMinimalBuildSettings = @{ @" Shared" : @" " , @" Release" : @" " , @" Debug" : @" COPY_PHASE_STRIP = NO" };
47- XCTAssertTrue (dictionaryWithMinimalBuildSettings.containsBuildSettings );
47+ XCTAssertTrue (dictionaryWithMinimalBuildSettings.tps_containsBuildSettings );
4848
4949 NSDictionary *dictionaryWithoutBuildSettings = @{ @" Shared" : @" " , @" Release" : @" " , @" Debug" : @" " };
50- XCTAssertFalse (dictionaryWithoutBuildSettings.containsBuildSettings );
50+ XCTAssertFalse (dictionaryWithoutBuildSettings.tps_containsBuildSettings );
5151
5252 NSDictionary *badDictionary = @{@" Shared" :@" " , @" Release" :@" " , @" Debug" :[NSDate date ] };
5353 BOOL result = NO ;
54- XCTAssertThrows (result = badDictionary.containsBuildSettings );
54+ XCTAssertThrows (result = badDictionary.tps_containsBuildSettings );
5555}
5656
5757- (void )testLoadingBuildSettingInfo
You can’t perform that action at this time.
0 commit comments