|
15 | 15 | static NSSet *_compatibilityVersionStringSet; |
16 | 16 | static dispatch_once_t onceToken; |
17 | 17 | dispatch_once(&onceToken, ^{ |
18 | | - _compatibilityVersionStringSet = [NSSet setWithObjects:@"Xcode 3.2", @"Xcode 6.3", @"Xcode 8.0", @"Xcode 9.3", @"Xcode 10.0", @"Xcode 11.0", @"Xcode 11.4", @"Xcode 12.0", @"Xcode 13.0", @"Xcode 14.0", @"Xcode 15.0", nil]; |
| 18 | + _compatibilityVersionStringSet = [NSSet setWithObjects:@"Xcode 3.2", @"Xcode 6.3", @"Xcode 8.0", @"Xcode 9.3", @"Xcode 10.0", @"Xcode 11.0", @"Xcode 11.4", @"Xcode 12.0", @"Xcode 13.0", @"Xcode 14.0", @"Xcode 15.0", @"Xcode 15.3", @"Xcode 16.0", nil]; |
19 | 19 | }); |
20 | 20 | return _compatibilityVersionStringSet; |
21 | 21 | } |
22 | 22 |
|
| 23 | +static NSSet *XcodeObjectVersionStringSet(void) { |
| 24 | + static NSSet *_objectVersionStringSet; |
| 25 | + static dispatch_once_t onceToken; |
| 26 | + dispatch_once(&onceToken, ^{ |
| 27 | + _objectVersionStringSet = [NSSet setWithObjects:@"77", @"70", nil]; |
| 28 | + }); |
| 29 | + return _objectVersionStringSet; |
| 30 | +} |
| 31 | + |
23 | 32 | @interface BuildSettingExtractor () |
24 | 33 | @property (strong) NSMutableDictionary *buildSettingsByTarget; |
25 | 34 | @property (strong) NSDictionary *objects; |
@@ -143,13 +152,17 @@ - (NSArray *)extractBuildSettingsFromProject:(NSURL *)projectWrapperURL error:(N |
143 | 152 | return nil; |
144 | 153 | } |
145 | 154 |
|
| 155 | + // Get object version |
| 156 | + NSString *objectVersion = projectPlist[@"objectVersion"]; |
| 157 | + |
146 | 158 | // Get root object (project) |
147 | 159 | self.objects = projectPlist[@"objects"]; |
148 | 160 | NSDictionary *rootObject = self.objects[projectPlist[@"rootObject"]]; |
149 | 161 |
|
150 | 162 | // Check compatibility version |
151 | 163 | NSString *compatibilityVersion = rootObject[@"compatibilityVersion"]; |
152 | | - if (![XcodeCompatibilityVersionStringSet() containsObject:compatibilityVersion]) { |
| 164 | + |
| 165 | + if (![XcodeCompatibilityVersionStringSet() containsObject:compatibilityVersion] && ![XcodeObjectVersionStringSet() containsObject:objectVersion]){ |
153 | 166 | if (error) { |
154 | 167 | *error = [NSError errorForUnsupportedProjectURL:projectWrapperURL fileVersion:compatibilityVersion]; |
155 | 168 | } |
|
0 commit comments