diff --git a/Sources/ImgixClient.swift b/Sources/ImgixClient.swift index cbf6adb..8500ca0 100644 --- a/Sources/ImgixClient.swift +++ b/Sources/ImgixClient.swift @@ -150,7 +150,7 @@ import Foundation signatureBase += "?" + queryString } - let signature = signatureBase.ixMd5 + let signature = signatureBase.ixMd5() return URLQueryItem.init(name: "s", value: signature) } diff --git a/Sources/ImgixSwift-Umbrella-Header.h b/Sources/ImgixSwift-Umbrella-Header.h deleted file mode 100644 index 8da1502..0000000 --- a/Sources/ImgixSwift-Umbrella-Header.h +++ /dev/null @@ -1,9 +0,0 @@ -// -// ImgixSwift-Umbrella-Header.h -// imgix-swift -// -// Created by Paul Straw on 7/5/16. -// -// - -#import "NSString+ImgixSwiftMd5.h" diff --git a/Sources/ImgixSwift.modulemap b/Sources/ImgixSwift.modulemap deleted file mode 100644 index 98c3c6f..0000000 --- a/Sources/ImgixSwift.modulemap +++ /dev/null @@ -1,6 +0,0 @@ -framework module ImgixSwift { - umbrella header "ImgixSwift-Umbrella-Header.h" - - export * - module * { export * } -} diff --git a/Sources/NSString+ImgixSwiftMd5.h b/Sources/NSString+ImgixSwiftMd5.h deleted file mode 100644 index fa5a5ff..0000000 --- a/Sources/NSString+ImgixSwiftMd5.h +++ /dev/null @@ -1,15 +0,0 @@ -// -// Md5Hasher.h -// imgix-swift -// -// Created by Paul Straw on 7/5/16. -// -// - -@import Foundation; - -@interface NSString (ImgixSwiftMd5) - -@property (nonatomic, readonly, nullable) NSString *ixMd5; - -@end diff --git a/Sources/NSString+ImgixSwiftMd5.m b/Sources/NSString+ImgixSwiftMd5.m deleted file mode 100644 index 352e017..0000000 --- a/Sources/NSString+ImgixSwiftMd5.m +++ /dev/null @@ -1,30 +0,0 @@ -// -// Md5Hasher.m -// imgix-swift -// -// Created by Paul Straw on 7/5/16. -// -// - -#import "NSString+ImgixSwiftMd5.h" -#import - -@implementation NSString (ImgixSwiftMd5) - -- (NSString *)ixMd5 { - NSData *data = [self dataUsingEncoding:NSUTF8StringEncoding]; - - void *digestBuffer = malloc(CC_MD5_DIGEST_LENGTH); - CC_MD5(data.bytes, (CC_LONG)data.length, digestBuffer); - NSData *digest = [NSData dataWithBytesNoCopy:digestBuffer length:CC_MD5_DIGEST_LENGTH]; - - NSMutableString *builder = [[NSMutableString alloc] init]; - const unsigned char *buffer = digest.bytes; - for (NSUInteger i = 0; i < digest.length; i++) { - [builder appendFormat:@"%02x", buffer[i]]; - } - return builder; -} - - -@end diff --git a/Sources/String+ImgixSwift.swift b/Sources/String+ImgixSwift.swift index 6d9e580..0172be2 100644 --- a/Sources/String+ImgixSwift.swift +++ b/Sources/String+ImgixSwift.swift @@ -7,6 +7,9 @@ // import Foundation +import var CommonCrypto.CC_MD5_DIGEST_LENGTH +import func CommonCrypto.CC_MD5 +import typealias CommonCrypto.CC_LONG extension String { static var ixEncodeUriComponentCharSet: CharacterSet = { @@ -32,4 +35,25 @@ extension String { func ixEncodeUriComponent() -> String { return self.addingPercentEncoding(withAllowedCharacters: String.ixEncodeUriComponentCharSet)! } + + func ixMd5() -> String { + return MD5(string: self) + } + + func MD5(string: String) -> String { + let length = Int(CC_MD5_DIGEST_LENGTH) + let messageData = string.data(using:.utf8)! + var digestData = Data(count: length) + + _ = digestData.withUnsafeMutableBytes { digestBytes -> UInt8 in + messageData.withUnsafeBytes { messageBytes -> UInt8 in + if let messageBytesBaseAddress = messageBytes.baseAddress, let digestBytesBlindMemory = digestBytes.bindMemory(to: UInt8.self).baseAddress { + let messageLength = CC_LONG(messageData.count) + CC_MD5(messageBytesBaseAddress, messageLength, digestBytesBlindMemory) + } + return 0 + } + } + return digestData.map { String(format: "%02hhx", $0) }.joined() + } } diff --git a/imgix-swift.xcodeproj/project.pbxproj b/imgix-swift.xcodeproj/project.pbxproj index 1e30f69..1b3bb4b 100644 --- a/imgix-swift.xcodeproj/project.pbxproj +++ b/imgix-swift.xcodeproj/project.pbxproj @@ -7,6 +7,8 @@ objects = { /* Begin PBXBuildFile section */ + 580B383523E4DFA100FB9DF3 /* ReconstructTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8FB9ABCC1DCC037B00D2FD6B /* ReconstructTests.swift */; }; + 580B383623E4DFEA00FB9DF3 /* ReconstructTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8FB9ABCC1DCC037B00D2FD6B /* ReconstructTests.swift */; }; 8F06ECF11D2C8AA8001CEC88 /* ImgixSwift.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8F06ECCC1D2C8832001CEC88 /* ImgixSwift.framework */; }; 8F06ED001D2C8ABA001CEC88 /* ImgixSwift.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8F06ECA51D2C8805001CEC88 /* ImgixSwift.framework */; }; 8F06ED0F1D2C8AD2001CEC88 /* ImgixSwift.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8F06ECBF1D2C8828001CEC88 /* ImgixSwift.framework */; }; @@ -25,15 +27,6 @@ 8F12BC2E1D2EF2FE00B56C8A /* String+ImgixSwift.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8F12BC2D1D2EF2FE00B56C8A /* String+ImgixSwift.swift */; }; 8F12BC2F1D2EF2FE00B56C8A /* String+ImgixSwift.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8F12BC2D1D2EF2FE00B56C8A /* String+ImgixSwift.swift */; }; 8F12BC301D2EF2FE00B56C8A /* String+ImgixSwift.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8F12BC2D1D2EF2FE00B56C8A /* String+ImgixSwift.swift */; }; - 8F7467631D2CBD0900E1CE15 /* NSString+ImgixSwiftMd5.m in Sources */ = {isa = PBXBuildFile; fileRef = 8F7467621D2CBD0900E1CE15 /* NSString+ImgixSwiftMd5.m */; }; - 8F7467641D2CBD0900E1CE15 /* NSString+ImgixSwiftMd5.m in Sources */ = {isa = PBXBuildFile; fileRef = 8F7467621D2CBD0900E1CE15 /* NSString+ImgixSwiftMd5.m */; }; - 8F7467651D2CBD0900E1CE15 /* NSString+ImgixSwiftMd5.m in Sources */ = {isa = PBXBuildFile; fileRef = 8F7467621D2CBD0900E1CE15 /* NSString+ImgixSwiftMd5.m */; }; - 8F7467671D2CBD1A00E1CE15 /* NSString+ImgixSwiftMd5.h in Headers */ = {isa = PBXBuildFile; fileRef = 8F7467661D2CBD1A00E1CE15 /* NSString+ImgixSwiftMd5.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 8F7467681D2CBD1A00E1CE15 /* NSString+ImgixSwiftMd5.h in Headers */ = {isa = PBXBuildFile; fileRef = 8F7467661D2CBD1A00E1CE15 /* NSString+ImgixSwiftMd5.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 8F7467691D2CBD1A00E1CE15 /* NSString+ImgixSwiftMd5.h in Headers */ = {isa = PBXBuildFile; fileRef = 8F7467661D2CBD1A00E1CE15 /* NSString+ImgixSwiftMd5.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 8F74676B1D2CBF9600E1CE15 /* ImgixSwift-Umbrella-Header.h in Headers */ = {isa = PBXBuildFile; fileRef = 8F74676A1D2CBF9600E1CE15 /* ImgixSwift-Umbrella-Header.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 8F74676C1D2CBF9600E1CE15 /* ImgixSwift-Umbrella-Header.h in Headers */ = {isa = PBXBuildFile; fileRef = 8F74676A1D2CBF9600E1CE15 /* ImgixSwift-Umbrella-Header.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 8F74676D1D2CBF9600E1CE15 /* ImgixSwift-Umbrella-Header.h in Headers */ = {isa = PBXBuildFile; fileRef = 8F74676A1D2CBF9600E1CE15 /* ImgixSwift-Umbrella-Header.h */; settings = {ATTRIBUTES = (Public, ); }; }; 8F91A77B1D2C94EB0010384D /* ImgixClient.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8F91A7751D2C94EB0010384D /* ImgixClient.swift */; }; 8F91A77C1D2C94EB0010384D /* ImgixClient.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8F91A7751D2C94EB0010384D /* ImgixClient.swift */; }; 8F91A77D1D2C94EB0010384D /* ImgixClient.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8F91A7751D2C94EB0010384D /* ImgixClient.swift */; }; @@ -72,10 +65,6 @@ 8F06ECFB1D2C8ABA001CEC88 /* ImgixSwiftTests-iOS.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "ImgixSwiftTests-iOS.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; 8F06ED0A1D2C8AD2001CEC88 /* ImgixSwiftTests-tvOS.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "ImgixSwiftTests-tvOS.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; 8F12BC2D1D2EF2FE00B56C8A /* String+ImgixSwift.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = "String+ImgixSwift.swift"; path = "Sources/String+ImgixSwift.swift"; sourceTree = ""; }; - 8F7467621D2CBD0900E1CE15 /* NSString+ImgixSwiftMd5.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "NSString+ImgixSwiftMd5.m"; path = "Sources/NSString+ImgixSwiftMd5.m"; sourceTree = ""; }; - 8F7467661D2CBD1A00E1CE15 /* NSString+ImgixSwiftMd5.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "NSString+ImgixSwiftMd5.h"; path = "Sources/NSString+ImgixSwiftMd5.h"; sourceTree = ""; }; - 8F74676A1D2CBF9600E1CE15 /* ImgixSwift-Umbrella-Header.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "ImgixSwift-Umbrella-Header.h"; path = "Sources/ImgixSwift-Umbrella-Header.h"; sourceTree = ""; }; - 8F74676F1D2CC15000E1CE15 /* ImgixSwift.modulemap */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = "sourcecode.module-map"; name = ImgixSwift.modulemap; path = Sources/ImgixSwift.modulemap; sourceTree = ""; }; 8F9052181D2C34A000B0C1B6 /* SignatureTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SignatureTests.swift; sourceTree = ""; }; 8F90521A1D2C3D0B00B0C1B6 /* WebProxyTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WebProxyTests.swift; sourceTree = ""; }; 8F91A76E1D2C94CD0010384D /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = Sources/Info.plist; sourceTree = ""; }; @@ -163,10 +152,6 @@ 8F91A76E1D2C94CD0010384D /* Info.plist */, 8F91A7751D2C94EB0010384D /* ImgixClient.swift */, 8F12BC2D1D2EF2FE00B56C8A /* String+ImgixSwift.swift */, - 8F7467621D2CBD0900E1CE15 /* NSString+ImgixSwiftMd5.m */, - 8F7467661D2CBD1A00E1CE15 /* NSString+ImgixSwiftMd5.h */, - 8F74676A1D2CBF9600E1CE15 /* ImgixSwift-Umbrella-Header.h */, - 8F74676F1D2CC15000E1CE15 /* ImgixSwift.modulemap */, ); name = Sources; sourceTree = ""; @@ -191,8 +176,6 @@ isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - 8F74676B1D2CBF9600E1CE15 /* ImgixSwift-Umbrella-Header.h in Headers */, - 8F7467671D2CBD1A00E1CE15 /* NSString+ImgixSwiftMd5.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -200,8 +183,6 @@ isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - 8F74676C1D2CBF9600E1CE15 /* ImgixSwift-Umbrella-Header.h in Headers */, - 8F7467681D2CBD1A00E1CE15 /* NSString+ImgixSwiftMd5.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -209,8 +190,6 @@ isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - 8F74676D1D2CBF9600E1CE15 /* ImgixSwift-Umbrella-Header.h in Headers */, - 8F7467691D2CBD1A00E1CE15 /* NSString+ImgixSwiftMd5.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -332,7 +311,7 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 0730; - LastUpgradeCheck = 0940; + LastUpgradeCheck = 1130; TargetAttributes = { 8F06ECA41D2C8805001CEC88 = { CreatedOnToolsVersion = 7.3.1; @@ -340,15 +319,15 @@ }; 8F06ECBE1D2C8828001CEC88 = { CreatedOnToolsVersion = 7.3.1; - LastSwiftMigration = 0800; + LastSwiftMigration = 1130; }; 8F06ECCB1D2C8832001CEC88 = { CreatedOnToolsVersion = 7.3.1; - LastSwiftMigration = 0940; + LastSwiftMigration = 1130; }; 8F06ECEB1D2C8AA8001CEC88 = { CreatedOnToolsVersion = 7.3.1; - LastSwiftMigration = 0940; + LastSwiftMigration = 1130; }; 8F06ECFA1D2C8ABA001CEC88 = { CreatedOnToolsVersion = 7.3.1; @@ -356,16 +335,17 @@ }; 8F06ED091D2C8AD2001CEC88 = { CreatedOnToolsVersion = 7.3.1; - LastSwiftMigration = 0800; + LastSwiftMigration = 1130; }; }; }; buildConfigurationList = 8F82BE541D25EDDD00551F76 /* Build configuration list for PBXProject "imgix-swift" */; compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; + developmentRegion = en; hasScannedForEncodings = 0; knownRegions = ( en, + Base, ); mainGroup = 8F82BE501D25EDDD00551F76; productRefGroup = 8F82BE5D1D25EE1100551F76 /* Products */; @@ -433,7 +413,6 @@ buildActionMask = 2147483647; files = ( 8F91A77B1D2C94EB0010384D /* ImgixClient.swift in Sources */, - 8F7467631D2CBD0900E1CE15 /* NSString+ImgixSwiftMd5.m in Sources */, 8F12BC2E1D2EF2FE00B56C8A /* String+ImgixSwift.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; @@ -443,7 +422,6 @@ buildActionMask = 2147483647; files = ( 8F91A77C1D2C94EB0010384D /* ImgixClient.swift in Sources */, - 8F7467641D2CBD0900E1CE15 /* NSString+ImgixSwiftMd5.m in Sources */, 8F12BC2F1D2EF2FE00B56C8A /* String+ImgixSwift.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; @@ -453,7 +431,6 @@ buildActionMask = 2147483647; files = ( 8F91A77D1D2C94EB0010384D /* ImgixClient.swift in Sources */, - 8F7467651D2CBD0900E1CE15 /* NSString+ImgixSwiftMd5.m in Sources */, 8F12BC301D2EF2FE00B56C8A /* String+ImgixSwift.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; @@ -474,6 +451,7 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( + 580B383623E4DFEA00FB9DF3 /* ReconstructTests.swift in Sources */, 8F06ED1B1D2C8AE1001CEC88 /* SignatureTests.swift in Sources */, 8F06ED191D2C8AE1001CEC88 /* BuildUrlTests.swift in Sources */, 8F06ED1A1D2C8AE1001CEC88 /* InitializationTests.swift in Sources */, @@ -485,6 +463,7 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( + 580B383523E4DFA100FB9DF3 /* ReconstructTests.swift in Sources */, 8F06ED1F1D2C8AE1001CEC88 /* SignatureTests.swift in Sources */, 8F06ED1D1D2C8AE1001CEC88 /* BuildUrlTests.swift in Sources */, 8F06ED1E1D2C8AE1001CEC88 /* InitializationTests.swift in Sources */, @@ -536,7 +515,7 @@ COPY_PHASE_STRIP = NO; CURRENT_PROJECT_VERSION = 1; DEBUG_INFORMATION_FORMAT = dwarf; - DEFINES_MODULE = YES; + DEFINES_MODULE = NO; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; @@ -560,7 +539,7 @@ INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 9.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = Sources/ImgixSwift.modulemap; + MODULEMAP_FILE = ""; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; PRODUCT_BUNDLE_IDENTIFIER = com.imgix.ImgixSwift; @@ -602,7 +581,7 @@ COPY_PHASE_STRIP = NO; CURRENT_PROJECT_VERSION = 1; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - DEFINES_MODULE = YES; + DEFINES_MODULE = NO; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; @@ -620,7 +599,7 @@ INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 9.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = Sources/ImgixSwift.modulemap; + MODULEMAP_FILE = ""; MTL_ENABLE_DEBUG_INFO = NO; PRODUCT_BUNDLE_IDENTIFIER = com.imgix.ImgixSwift; PRODUCT_NAME = ImgixSwift; @@ -660,7 +639,7 @@ COPY_PHASE_STRIP = NO; CURRENT_PROJECT_VERSION = 1; DEBUG_INFORMATION_FORMAT = dwarf; - DEFINES_MODULE = YES; + DEFINES_MODULE = NO; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; @@ -683,7 +662,7 @@ INFOPLIST_FILE = "$(SRCROOT)/Sources/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = Sources/ImgixSwift.modulemap; + MODULEMAP_FILE = ""; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; PRODUCT_BUNDLE_IDENTIFIER = com.imgix.ImgixSwift; @@ -694,7 +673,7 @@ SWIFT_OBJC_BRIDGING_HEADER = ""; SWIFT_OBJC_INTERFACE_HEADER_NAME = "$(SWIFT_MODULE_NAME).h"; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = 3; TVOS_DEPLOYMENT_TARGET = 9.2; VALID_ARCHS = "$(ARCHS_STANDARD)"; @@ -725,7 +704,7 @@ COPY_PHASE_STRIP = NO; CURRENT_PROJECT_VERSION = 1; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - DEFINES_MODULE = YES; + DEFINES_MODULE = NO; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; @@ -742,7 +721,7 @@ INFOPLIST_FILE = "$(SRCROOT)/Sources/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = Sources/ImgixSwift.modulemap; + MODULEMAP_FILE = ""; MTL_ENABLE_DEBUG_INFO = NO; PRODUCT_BUNDLE_IDENTIFIER = com.imgix.ImgixSwift; PRODUCT_NAME = ImgixSwift; @@ -751,7 +730,7 @@ SUPPORTED_PLATFORMS = "appletvsimulator appletvos"; SWIFT_OBJC_BRIDGING_HEADER = ""; SWIFT_OBJC_INTERFACE_HEADER_NAME = "$(SWIFT_MODULE_NAME).h"; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = 3; TVOS_DEPLOYMENT_TARGET = 9.2; VALIDATE_PRODUCT = YES; @@ -784,7 +763,7 @@ COPY_PHASE_STRIP = NO; CURRENT_PROJECT_VERSION = 1; DEBUG_INFORMATION_FORMAT = dwarf; - DEFINES_MODULE = YES; + DEFINES_MODULE = NO; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; @@ -809,7 +788,7 @@ INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks"; MACOSX_DEPLOYMENT_TARGET = 10.10; - MODULEMAP_FILE = Sources/ImgixSwift.modulemap; + MODULEMAP_FILE = ""; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; PRODUCT_BUNDLE_IDENTIFIER = com.imgix.ImgixSwift; @@ -820,8 +799,8 @@ SWIFT_OBJC_BRIDGING_HEADER = ""; SWIFT_OBJC_INTERFACE_HEADER_NAME = "$(SWIFT_MODULE_NAME).h"; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_SWIFT3_OBJC_INFERENCE = On; - SWIFT_VERSION = 4.0; + SWIFT_SWIFT3_OBJC_INFERENCE = Default; + SWIFT_VERSION = 5.0; VALID_ARCHS = "$(ARCHS_STANDARD)"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; @@ -851,7 +830,7 @@ COPY_PHASE_STRIP = NO; CURRENT_PROJECT_VERSION = 1; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - DEFINES_MODULE = YES; + DEFINES_MODULE = NO; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; @@ -870,7 +849,7 @@ INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks"; MACOSX_DEPLOYMENT_TARGET = 10.10; - MODULEMAP_FILE = Sources/ImgixSwift.modulemap; + MODULEMAP_FILE = ""; MTL_ENABLE_DEBUG_INFO = NO; PRODUCT_BUNDLE_IDENTIFIER = com.imgix.ImgixSwift; PRODUCT_NAME = ImgixSwift; @@ -879,8 +858,8 @@ SUPPORTED_PLATFORMS = macosx; SWIFT_OBJC_BRIDGING_HEADER = ""; SWIFT_OBJC_INTERFACE_HEADER_NAME = "$(SWIFT_MODULE_NAME).h"; - SWIFT_SWIFT3_OBJC_INFERENCE = On; - SWIFT_VERSION = 4.0; + SWIFT_SWIFT3_OBJC_INFERENCE = Default; + SWIFT_VERSION = 5.0; VALID_ARCHS = "$(ARCHS_STANDARD)"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; @@ -933,8 +912,8 @@ PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = macosx; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_SWIFT3_OBJC_INFERENCE = On; - SWIFT_VERSION = 4.0; + SWIFT_SWIFT3_OBJC_INFERENCE = Default; + SWIFT_VERSION = 5.0; }; name = Debug; }; @@ -976,8 +955,8 @@ PRODUCT_BUNDLE_IDENTIFIER = "com.imgix.ImgixSwiftTests-macOS"; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = macosx; - SWIFT_SWIFT3_OBJC_INFERENCE = On; - SWIFT_VERSION = 4.0; + SWIFT_SWIFT3_OBJC_INFERENCE = Default; + SWIFT_VERSION = 5.0; }; name = Release; }; @@ -1115,7 +1094,7 @@ PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = appletvos; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 5.0; TVOS_DEPLOYMENT_TARGET = 9.2; }; name = Debug; @@ -1155,7 +1134,7 @@ PRODUCT_BUNDLE_IDENTIFIER = "com.imgix.ImgixSwiftTests-tvOS"; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = appletvos; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 5.0; TVOS_DEPLOYMENT_TARGET = 9.2; VALIDATE_PRODUCT = YES; }; @@ -1166,6 +1145,7 @@ buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = NO; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; @@ -1194,10 +1174,9 @@ GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; INFOPLIST_FILE = ""; - ONLY_ACTIVE_ARCH = YES; + ONLY_ACTIVE_ARCH = NO; PRODUCT_NAME = ImgixSwift; SUPPORTED_PLATFORMS = "macosx iphonesimulator iphoneos appletvsimulator appletvos watchsimulator watchos"; - VALID_ARCHS = "arm64 x86_64 armv7 armv7s"; }; name = Debug; }; @@ -1206,6 +1185,7 @@ buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = NO; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; @@ -1236,7 +1216,6 @@ PRODUCT_NAME = ImgixSwift; SUPPORTED_PLATFORMS = "macosx iphonesimulator iphoneos appletvsimulator appletvos watchsimulator watchos"; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - VALID_ARCHS = "arm64 x86_64 armv7 armv7s"; }; name = Release; }; diff --git a/imgix-swift.xcodeproj/xcshareddata/xcschemes/ImgixSwift-iOS.xcscheme b/imgix-swift.xcodeproj/xcshareddata/xcschemes/ImgixSwift-iOS.xcscheme index f6b90fe..e81c40e 100644 --- a/imgix-swift.xcodeproj/xcshareddata/xcschemes/ImgixSwift-iOS.xcscheme +++ b/imgix-swift.xcodeproj/xcshareddata/xcschemes/ImgixSwift-iOS.xcscheme @@ -1,6 +1,6 @@ + + + + @@ -39,17 +48,6 @@ - - - - - - - - + + + + @@ -39,17 +48,6 @@ - - - - - - - - + + + + @@ -39,17 +48,6 @@ - - - - - - - - - - - - - - - - - - - -