diff --git a/Source/Utils/XCKeyBuilder.h b/Source/Utils/XCKeyBuilder.h index 1183308..9e489b8 100755 --- a/Source/Utils/XCKeyBuilder.h +++ b/Source/Utils/XCKeyBuilder.h @@ -11,13 +11,14 @@ #import -#import + #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; diff --git a/Source/Utils/XCKeyBuilder.m b/Source/Utils/XCKeyBuilder.m index 77476a5..60c68fe 100755 --- a/Source/Utils/XCKeyBuilder.m +++ b/Source/Utils/XCKeyBuilder.m @@ -10,6 +10,11 @@ //////////////////////////////////////////////////////////////////////////////// #import "XCKeyBuilder.h" +#import + +#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 diff --git a/Source/XCProject.m b/Source/XCProject.m index b41b7d7..39faadb 100755 --- a/Source/XCProject.m +++ b/Source/XCProject.m @@ -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 @@ -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"]; diff --git a/Source/XcodeSourceFileType.h b/Source/XcodeSourceFileType.h index 152bd1a..4b4059c 100755 --- a/Source/XcodeSourceFileType.h +++ b/Source/XcodeSourceFileType.h @@ -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); diff --git a/Source/XcodeSourceFileType.m b/Source/XcodeSourceFileType.m index 7894240..287cfa3 100755 --- a/Source/XcodeSourceFileType.m +++ b/Source/XcodeSourceFileType.m @@ -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) + }; });