Skip to content

Commit 9596d18

Browse files
Sort build settings using case insensitive compare
1 parent 04dea45 commit 9596d18

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

BuildSettingExtractor/BuildSettingExtractor.m

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,10 @@ - (NSString *)configFilenameWithTargetName:(NSString *)targetName configName:(NS
133133
- (NSString *)stringRepresentationOfBuildSettings:(NSDictionary *)buildSettings {
134134
NSMutableString *string = [[NSMutableString alloc] init];
135135

136-
for (NSString *key in [[buildSettings allKeys] sortedArrayUsingSelector:@selector(localizedStandardCompare:)]) {
136+
// Sort build settings by name for easier reading and testing. Case insensitive compare should stay stable regardess of locale.
137+
NSArray *sortedKeys = [[buildSettings allKeys] sortedArrayUsingSelector:@selector(caseInsensitiveCompare:)];
138+
139+
for (NSString *key in sortedKeys) {
137140
id value = buildSettings[key];
138141

139142
if ([value isKindOfClass:[NSString class]]) {

0 commit comments

Comments
 (0)