Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update for today's Xcode 13.2.1 #93

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ xcuserdata
.DS_Store
build
.build

2,658 changes: 2,658 additions & 0 deletions Doxyfile

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion Source/Include/XCBuildFile.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
//

#import <Foundation/Foundation.h>
#import "XcodeMemberType.h"
#import <XcodeEditor/XcodeMemberType.h>

@protocol XCBuildFile <NSObject>

Expand Down
4 changes: 2 additions & 2 deletions Source/Include/XCBuildShellScript.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
//

#import <Foundation/Foundation.h>
#import "XcodeGroupMember.h"
#import "XcodeSourceFileType.h"
#import <XcodeEditor/XcodeGroupMember.h>
#import <XcodeEditor/XcodeSourceFileType.h>

@class XCProject;

Expand Down
2 changes: 1 addition & 1 deletion Source/Include/XCBuildShellScriptDefinition.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
//

#import <Foundation/Foundation.h>
#import "XCAbstractDefinition.h"
#import <XcodeEditor/XCAbstractDefinition.h>

@interface XCBuildShellScriptDefinition : XCAbstractDefinition
{
Expand Down
2 changes: 1 addition & 1 deletion Source/Include/XCClassDefinition.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@


#import <Foundation/Foundation.h>
#import "XCAbstractDefinition.h"
#import <XcodeEditor/XCAbstractDefinition.h>

typedef enum
{
Expand Down
6 changes: 3 additions & 3 deletions Source/Include/XCFrameworkDefinition.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@


#import <Foundation/Foundation.h>
#import "XCAbstractDefinition.h"
#import "XcodeSourceTreeType.h"
#import <XcodeEditor/XCAbstractDefinition.h>
#import <XcodeEditor/XcodeSourceTreeType.h>

@interface XCFrameworkDefinition : XCAbstractDefinition
{
Expand All @@ -37,4 +37,4 @@



@end
@end
6 changes: 3 additions & 3 deletions Source/Include/XCGroup.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@


#import <Foundation/Foundation.h>
#import "XcodeGroupMember.h"
#import "XcodeSourceFileType.h"
#import "XCBuildFile.h"
#import <XcodeEditor/XcodeGroupMember.h>
#import <XcodeEditor/XcodeSourceFileType.h>
#import <XcodeEditor/XCBuildFile.h>

@class XCProject;
@class XCClassDefinition;
Expand Down
4 changes: 2 additions & 2 deletions Source/Include/XCProject+SubProject.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@


#import <Foundation/Foundation.h>
#import "XCProject.h"
#import <XcodeEditor/XCProject.h>

@interface XCProject (SubProject)

Expand Down Expand Up @@ -40,4 +40,4 @@

- (NSString *)productsGroupKeyForKey:(NSString *)key;

@end
@end
6 changes: 3 additions & 3 deletions Source/Include/XCProject.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
////////////////////////////////////////////////////////////////////////////////

#import <Foundation/Foundation.h>
#import "XcodeMemberType.h"
#import "XcodeSourceFileType.h"
#import "XcodeGroupMember.h"
#import <XcodeEditor/XcodeMemberType.h>
#import <XcodeEditor/XcodeSourceFileType.h>
#import <XcodeEditor/XcodeGroupMember.h>

@class XCClassDefinition;
@class XCGroup;
Expand Down
6 changes: 3 additions & 3 deletions Source/Include/XCSourceFile.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@


#import <Foundation/Foundation.h>
#import "XcodeGroupMember.h"
#import "XcodeSourceFileType.h"
#import "XCBuildFile.h"
#import <XcodeEditor/XcodeGroupMember.h>
#import <XcodeEditor/XcodeSourceFileType.h>
#import <XcodeEditor/XCBuildFile.h>

@class XCProject;

Expand Down
4 changes: 2 additions & 2 deletions Source/Include/XCSourceFileDefinition.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@


#import <Foundation/Foundation.h>
#import "XCAbstractDefinition.h"
#import "XcodeSourceFileType.h"
#import <XcodeEditor/XCAbstractDefinition.h>
#import <XcodeEditor/XcodeSourceFileType.h>

@interface XCSourceFileDefinition : XCAbstractDefinition
{
Expand Down
4 changes: 2 additions & 2 deletions Source/Include/XCSubProjectDefinition.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@


#import <Foundation/Foundation.h>
#import "XCAbstractDefinition.h"
#import "XcodeSourceFileType.h"
#import <XcodeEditor/XCAbstractDefinition.h>
#import <XcodeEditor/XcodeSourceFileType.h>

@class XCProject;

Expand Down
6 changes: 3 additions & 3 deletions Source/Include/XCVersionGroup.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
//

#import <Foundation/Foundation.h>
#import "XcodeGroupMember.h"
#import "XCGroup.h"
#import "XCBuildFile.h"
#import <XcodeEditor/XcodeGroupMember.h>
#import <XcodeEditor/XCGroup.h>
#import <XcodeEditor/XCBuildFile.h>

@class XCProject;
@class XCClassDefinition;
Expand Down
2 changes: 1 addition & 1 deletion Source/Include/XCXibDefinition.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@


#import <Foundation/Foundation.h>
#import "XCAbstractDefinition.h"
#import <XcodeEditor/XCAbstractDefinition.h>


@interface XCXibDefinition : XCAbstractDefinition
Expand Down
34 changes: 17 additions & 17 deletions Source/Include/XcodeEditor.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,20 @@ FOUNDATION_EXPORT const unsigned char XcodeEditorVersionString[];
// In this header, you should import all the public headers of your framework using statements like #import <XcodeEditor/PublicHeader.h>


#import "XCAbstractDefinition.h"
#import "XCGroup.h"
#import "XCClassDefinition.h"
#import "XCFileOperationQueue.h"
#import "XCFrameworkDefinition.h"
#import "XCProject.h"
#import "XCSourceFile.h"
#import "XCSourceFileDefinition.h"
#import "XCSubProjectDefinition.h"
#import "XCTarget.h"
#import "XCXibDefinition.h"
#import "XCKeyBuilder.h"
#import "XCProject+SubProject.h"
#import "XCProjectBuildConfig.h"
#import "XCBuildShellScript.h"
#import "XCBuildShellScriptDefinition.h"
#import "XCVersionGroup.h"
#import <XcodeEditor/XCAbstractDefinition.h>
#import <XcodeEditor/XCGroup.h>
#import <XcodeEditor/XCClassDefinition.h>
#import <XcodeEditor/XCFileOperationQueue.h>
#import <XcodeEditor/XCFrameworkDefinition.h>
#import <XcodeEditor/XCProject.h>
#import <XcodeEditor/XCSourceFile.h>
#import <XcodeEditor/XCSourceFileDefinition.h>
#import <XcodeEditor/XCSubProjectDefinition.h>
#import <XcodeEditor/XCTarget.h>
#import <XcodeEditor/XCXibDefinition.h>
#import <XcodeEditor/XCKeyBuilder.h>
#import <XcodeEditor/XCProject+SubProject.h>
#import <XcodeEditor/XCProjectBuildConfig.h>
#import <XcodeEditor/XCBuildShellScript.h>
#import <XcodeEditor/XCBuildShellScriptDefinition.h>
#import <XcodeEditor/XCVersionGroup.h>
4 changes: 2 additions & 2 deletions Source/Include/XcodeGroupMember.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@



#import "XcodeMemberType.h"
#import <XcodeEditor/XcodeMemberType.h>

@protocol XcodeGroupMember <NSObject>

Expand All @@ -25,4 +25,4 @@
* Group members can either be other groups (PBXGroup) or source files (PBXFileReference).
*/
- (XcodeMemberType)groupMemberType;
@end
@end
5 changes: 3 additions & 2 deletions Source/Resources/XcodeEditor-Prefix.pch
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@

#import <Foundation/Foundation.h>

#ifndef DEBUG
#define DEBUG 0
#endif

#if !DEBUG
#define NSLog(...)
#endif

3 changes: 2 additions & 1 deletion Source/Utils/XCKeyBuilder.m
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ - (id)initHashValueMD5HashWithBytes:(const void*)bytes length:(NSUInteger)length
self = [super init];
if (self != nil)
{
CC_MD5(bytes, (int) length, _value);
// CC_MD5(bytes, (int) length, _value);
CC_SHA256(bytes, ( CC_LONG )length, _value);
}
return self;
}
Expand Down
11 changes: 6 additions & 5 deletions Source/XCFileOperationQueue.m
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@


#import "XCFileOperationQueue.h"
#import "XcodeEditor-Prefix.pch"

@interface XCFileOperationQueue ()

Expand Down Expand Up @@ -81,7 +82,7 @@ - (void)queueFrameworkWithFilePath:(NSString*)filePath inDirectory:(NSString*)di

- (void)queueDeletion:(NSString*)filePath
{
NSLog(@"Queue deletion at: %@", filePath);
if ( DEBUG ) printf("Queue deletion at: %s\n", filePath.UTF8String);
[_filesToDelete addObject:filePath];
}

Expand Down Expand Up @@ -125,7 +126,7 @@ - (void)performCopyFrameworks
[_frameworksToCopy enumerateKeysAndObjectsUsingBlock:^(NSURL* destinationUrl, NSURL* frameworkPath, BOOL* stop)
{

NSLog(@"$$$$$$$$$$$$$$ destination url: %@", destinationUrl);
if ( DEBUG ) printf("$$$$$$$$$$$$$$ destination url: %s\n", destinationUrl.fileSystemRepresentation);
NSFileManager* fileManager = [NSFileManager defaultManager];

if ([fileManager fileExistsAtPath:[destinationUrl path]])
Expand All @@ -150,12 +151,12 @@ - (void)performFileDeletions

if (![[NSFileManager defaultManager] removeItemAtPath:fullPath error:&error])
{
NSLog(@"failed to remove item at path; error == %@", error);
fprintf(stderr, "failed to remove item at path; error == %s\n", error.description.UTF8String);
[NSException raise:NSInternalInconsistencyException format:@"Error deleting file at filePath: %@", filePath];
}
else
{
NSLog(@"Deleted: %@", fullPath);
if ( DEBUG ) printf("Deleted: %s\n", fullPath.UTF8String);
}
}
[_filesToDelete removeAllObjects];
Expand All @@ -177,4 +178,4 @@ - (void)performCreateDirectories
}


@end
@end
15 changes: 8 additions & 7 deletions Source/XCGroup.m
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#import "XCProject+SubProject.h"
#import "XcodeMemberType.h"
#import "XCVersionGroup.h"
#import "XcodeEditor-Prefix.pch"

@implementation XCGroup

Expand Down Expand Up @@ -96,17 +97,16 @@ - (void)removeFromParentDeletingChildren:(BOOL)deleteChildren
[_fileOperationQueue queueDeletion:[self pathRelativeToProjectRoot]];
}
NSDictionary *dictionary = [_project objects][_key];
NSLog(@"Here's the dictionary: %@", dictionary);
if (( dictionary ) && ( DEBUG )) printf("%s Dictionary: %s\n", __func__, dictionary.description.UTF8String ); else if ( DEBUG ) printf("%s No Dictionary\n", __func__);

[[_project objects] removeObjectForKey:_key];

dictionary = [_project objects][_key];
NSLog(@"Here's the dictionary: %@", dictionary);

if (( dictionary ) && ( DEBUG )) printf("%s Dictionary: %s\n", __func__, dictionary.description.UTF8String ); else if ( DEBUG ) printf("%s No Dictionary\n", __func__ );
for (XCTarget *target in [_project targets]) {
[target removeMembersWithKeys:[self recursiveMembers]];
}
NSLog(@"Done!!!");
if ( DEBUG ) puts("group removed");
}

- (XCGroup *)parentGroup
Expand Down Expand Up @@ -179,9 +179,10 @@ - (void)removeHeader:(XCClassDefinition*)classDefinition {

- (void)addFramework:(XCFrameworkDefinition *)frameworkDefinition
{
if (([self memberWithDisplayName:[frameworkDefinition fileName]]) == nil) {
NSLog(@"frame doesnt exists. creating %@", [frameworkDefinition fileName]);
NSLog(@"existing members: %@", [self members]);
if (([self memberWithDisplayName:[frameworkDefinition fileName]]) == nil)
{
if ( DEBUG ) printf("frame doesnt exists. creating %s\n", [frameworkDefinition fileName].UTF8String);
if ( DEBUG ) printf("existing members: %s\n", [self members].description.UTF8String );
NSDictionary *fileReference;
if ([frameworkDefinition copyToDestination]) {
fileReference = [self makeFileReferenceWithPath:[frameworkDefinition fileName] name:nil type:Framework
Expand Down
4 changes: 2 additions & 2 deletions Source/XCProject.m
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#import "XCFileOperationQueue.h"
#import "XCProjectBuildConfig.h"
#import "XCVersionGroup.h"
#import "XcodeEditor-Prefix.pch"

NSString *const XCProjectNotFoundException;

Expand Down Expand Up @@ -436,8 +437,7 @@ - (void)save

// Don't forget to reset the cache so that we'll always get the latest data.
[self dropCache];

NSLog(@"Saved project");
if ( DEBUG ) printf("Project %s saved\n", _filePath.lastPathComponent.UTF8String);
}

- (NSMutableDictionary *)objects
Expand Down
2 changes: 1 addition & 1 deletion Source/XCProjectBuildConfig.m
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ + (NSDictionary*)buildConfigurationsFromArray:(NSArray*)array inProject:(XCProje

if (![[NSFileManager defaultManager] fileExistsAtPath:path])
{
NSLog(@"XCConfig not found. Unable to find XCConfig file at %@", path);
fprintf(stderr, "XCConfig not found. Unable to find XCConfig file at %s\n", path.UTF8String);
}

}
Expand Down
12 changes: 7 additions & 5 deletions Source/XCVersionGroup.m
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#import "XCKeyBuilder.h"
#import "XCSourceFileDefinition.h"
#import "XCProject+SubProject.h"
#import "XcodeEditor-Prefix.pch"

@implementation XCVersionGroup

Expand Down Expand Up @@ -69,20 +70,21 @@ - (void)removeFromParentDeletingChildren:(BOOL)deleteChildren
[_fileOperationQueue queueDeletion:[self pathRelativeToProjectRoot]];
}
NSDictionary* dictionary = [_project objects][_key];
NSLog(@"Here's the dictionary: %@", dictionary);
if (( dictionary ) &&( DEBUG )) printf("Dictionary: %s\n", dictionary.description.UTF8String ); else if ( DEBUG ) printf("No Dictionary\n");

[[_project objects] removeObjectForKey:_key];

dictionary = [_project objects][_key];
NSLog(@"Here's the dictionary: %@", dictionary);

if ( DEBUG ) printf("%s",__func__);
if (( dictionary ) && ( DEBUG )) printf("Dictionary: %s\n", dictionary.description.UTF8String ); else if ( DEBUG ) printf("No Dictionary\n");

for (XCTarget* target in [_project targets])
{
for (XCSourceFile *source in [self members]) {
[target removeMemberWithKey:source.key];
}
}
NSLog(@"Done!!!");
if ( DEBUG ) puts("group removed");
}

- (XCGroup*)parentGroup
Expand Down
Loading