Skip to content
Merged
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions Source/Utils/XCKeyBuilder.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,14 @@


#import <Foundation/Foundation.h>
#import <CommonCrypto/CommonDigest.h>


#define HASH_VALUE_STORAGE_SIZE 48
#define MD5_DIGEST_LENGTH 16

typedef struct
{
char value[CC_MD5_DIGEST_LENGTH];
char value[MD5_DIGEST_LENGTH];
} HashValueMD5Hash;


Expand Down
5 changes: 5 additions & 0 deletions Source/Utils/XCKeyBuilder.m
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@
////////////////////////////////////////////////////////////////////////////////

#import "XCKeyBuilder.h"
#import <CommonCrypto/CommonDigest.h>

#if MD5_DIGEST_LENGTH != CC_MD5_DIGEST_LENGTH
#error Digest length in XCKeyBuilder.h (MD5_DIGEST_LENGTH) disagress with CommonCrypto value (CC_MD5_DIGEST_LENGTH)
#endif

@implementation XCKeyBuilder

Expand Down
4 changes: 2 additions & 2 deletions Source/XCProject.m
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ - (NSArray*)files
{
if ([[obj valueForKey:@"isa"] xce_hasFileReferenceType])
{
XcodeSourceFileType fileType = XCSourceFileTypeFromStringRepresentation([obj valueForKey:@"lastKnownFileType"]);
XcodeSourceFileType fileType = XCSourceFileTypeFromStringRepresentation([obj valueForKey:@"lastKnownFileType"] ?: [obj valueForKey:@"explicitFileType"]);
NSString* path = [obj valueForKey:@"path"];
NSString* sourceTree = [obj valueForKey:@"sourceTree"];
XCSourceFile* sourceFile = [XCSourceFile sourceFileWithProject:self
Expand All @@ -88,7 +88,7 @@ - (XCSourceFile*)fileWithKey:(NSString*)key
NSDictionary* obj = [[self objects] valueForKey:key];
if (obj && [[obj valueForKey:@"isa"] xce_hasFileReferenceOrReferenceProxyType])
{
XcodeSourceFileType fileType = XCSourceFileTypeFromStringRepresentation([obj valueForKey:@"lastKnownFileType"]);
XcodeSourceFileType fileType = XCSourceFileTypeFromStringRepresentation([obj valueForKey:@"lastKnownFileType"]?: [obj valueForKey:@"explicitFileType"]);

NSString* name = [obj valueForKey:@"name"];
NSString* sourceTree = [obj valueForKey:@"sourceTree"];
Expand Down
20 changes: 13 additions & 7 deletions Source/XcodeSourceFileType.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,19 @@ typedef NS_OPTIONS(NSInteger, XcodeSourceFileType)
XibFile = 7, // .xib
ImageResourcePNG = 8, // .png
Bundle = 9, // .bundle .octet
Archive = 10, // .a files
HTML = 11, // HTML file
TEXT = 12, // Some text file
XcodeProject = 13, // .xcodeproj
Folder = 14, // a Folder reference
AssetCatalog = 15, // Assets
SourceCodeSwift = 16 // .swift
Archive = 10, // .a files
HTML = 11, // HTML file
TEXT = 12, // Some text file
XcodeProject = 13, // .xcodeproj
Folder = 14, // a Folder reference
AssetCatalog = 15, // Assets
SourceCodeSwift = 16, // .swift
Application = 17, // .app (wrapper.application)
Playground = 18, // .playground (file.playground)
ShellScript = 19, // no suffix Xcode seems to detect (text.script.sh)
Markdown = 20, // .md (net.daringfileball.markdown)
XMLPropertyList = 21, // .plist (text.plist.xml)
Storyboard = 22 // .storyboard (file.storyboard)
};

NSString* NSStringFromXCSourceFileType(XcodeSourceFileType type);
Expand Down
9 changes: 8 additions & 1 deletion Source/XcodeSourceFileType.m
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,14 @@
@"wrapper.pb-project" : @(XcodeProject),
@"folder" : @(Folder),
@"folder.assetcatalog" : @(AssetCatalog),
@"sourcecode.swift" : @(SourceCodeSwift)
@"sourcecode.swift" : @(SourceCodeSwift),
@"wrapper.application" : @(Application),
@"file.playground" : @(Playground),
@"text.script.sh" : @(ShellScript),
@"net.daringfireball.markdown" : @(Markdown),
@"text.plist.xml" : @(XMLPropertyList),
@"file.storyboard" : @(Storyboard)

};
});

Expand Down