Skip to content

Commit

Permalink
Update to fix gcc errors
Browse files Browse the repository at this point in the history
  • Loading branch information
gcasa committed Aug 16, 2024
1 parent da2d28c commit 7ea7e54
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 6 deletions.
12 changes: 7 additions & 5 deletions XCode/NSObject+KeyExtraction.m
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ - (NSDictionary *) recursiveKeysAndValuesForObject: (id)object
[arrayValues addObject: [self recursiveKeysAndValuesForObject: item]];
}

keysAndValues[key] = arrayValues;
[keysAndValues setObject: arrayValues forKey: key];
}
else if ([value isKindOfClass:[NSDictionary class]])
{
Expand All @@ -45,16 +45,18 @@ - (NSDictionary *) recursiveKeysAndValuesForObject: (id)object
while ((dictKey = [en nextObject]) != nil)
{
id dictValue = [value objectForKey: dictKey];
dictValues[dictKey] = [self recursiveKeysAndValuesForObject:dictValue];
[dictValues setObject: [self recursiveKeysAndValuesForObject: dictValue]
forKey: dictKey];
}
keysAndValues[key] = dictValues;

[keysAndValues setObject: dictValues forKey: key];
}
else if ([value isKindOfClass: [NSObject class]]
&& ![value isKindOfClass: [NSString class]]
&& ![value isKindOfClass:[NSNumber class]])
{
[keysAndValues setObject: [self recursiveKeysAndValuesForObject:value]
forKey: key];
[keysAndValues setObject: [self recursiveKeysAndValuesForObject: value]
forKey: key];
}
else
{
Expand Down
3 changes: 3 additions & 0 deletions XCode/PBXCoder.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@

- (instancetype) initWithRootObject: (id)obj;

- (id) archive;

- (id) archiveWithRootObject: (id)rootObject;


@end
6 changes: 5 additions & 1 deletion XCode/PBXCoder.m
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,11 @@ - (void) dealloc

- (id) unarchive
{
return [self unarchiveFromDictionary: _dictionary];
id r = [self unarchiveFromDictionary: _dictionary];
NSLog(@"r = %@", r);
PBXCoder *newCoder = [[PBXCoder alloc] initWithRootObject: [r rootObject]];
NSLog(@"*** Archive = %@", [newCoder archive]);
return r;
}

- (id) unarchiveFromDictionary: (NSDictionary *)dict
Expand Down
3 changes: 3 additions & 0 deletions XCode/PBXContainerItemProxy.m
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,9 @@ - (BOOL) build
BOOL result = [container build];
[mgr changeCurrentDirectoryPath: dir];

PBXCoder *newCoder = [[PBXCoder alloc] initWithRootObject: container];
NSLog(@"*** Archive = %@", [newCoder archive]);

return result;
}
else
Expand Down
5 changes: 5 additions & 0 deletions XCode/XCFileRef.m
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,8 @@ - (NSArray *) targets
{
PBXContainer *pc = [coder unarchive];
PBXProject *prj = [pc rootObject];
PBXCoder *newCoder = [[PBXCoder alloc] initWithRootObject: pc];
NSLog(@"*** Archive = %@", [newCoder archive]);

result = [[prj targets] copy];
}
Expand Down Expand Up @@ -164,6 +166,9 @@ - (BOOL) performLegacyOperation: (SEL)sel
if (coder != nil)
{
PBXContainer *pc = [coder unarchive];
PBXCoder *newCoder = [[PBXCoder alloc] initWithRootObject: pc];
NSLog(@"*** Archive = %@", [newCoder archive]);

[pc setWorkspaceLink: _workspaceLink];
[pc setWorkspaceIncludes: _workspaceIncludes];
[pc setWorkspaceLibs: _workspaceLibs];
Expand Down

0 comments on commit 7ea7e54

Please sign in to comment.