diff --git a/.gitignore b/.gitignore index 712f71d..ef583ec 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,8 @@ # Xcode # build/ +DerivedData/ + *.pbxuser !default.pbxuser *.mode1v3 @@ -18,6 +20,14 @@ DerivedData *.xcscmblueprint *.xcuserstate + +### Xcode Patch ### +*.xcodeproj/* +!*.xcodeproj/project.pbxproj +!*.xcodeproj/xcshareddata/ +!*.xcworkspace/contents.xcworkspacedata +/*.gcno + # CocoaPods # # We recommend against adding the Pods directory to your .gitignore. However diff --git a/ELFoundation.xcodeproj/project.pbxproj b/ELFoundation.xcodeproj/project.pbxproj index 654b116..a3320ba 100644 --- a/ELFoundation.xcodeproj/project.pbxproj +++ b/ELFoundation.xcodeproj/project.pbxproj @@ -403,7 +403,7 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 0700; - LastUpgradeCheck = 0930; + LastUpgradeCheck = 1020; ORGANIZATIONNAME = WalmartLabs; TargetAttributes = { CA8CD5591B7A9DCA00DA8BF7 = { @@ -418,16 +418,17 @@ }; CACF2A141A9614D20084EFAE = { CreatedOnToolsVersion = 6.3; - LastSwiftMigration = 0920; + LastSwiftMigration = 1020; }; }; }; buildConfigurationList = CACF2A041A9614D20084EFAE /* Build configuration list for PBXProject "ELFoundation" */; compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; + developmentRegion = en; hasScannedForEncodings = 0; knownRegions = ( en, + Base, ); mainGroup = CACF2A001A9614D20084EFAE; productRefGroup = CACF2A0B1A9614D20084EFAE /* Products */; @@ -577,6 +578,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; @@ -624,7 +626,7 @@ ONLY_ACTIVE_ARCH = NO; SDKROOT = iphoneos; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - SWIFT_VERSION = 3.0.1; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; @@ -646,7 +648,7 @@ PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; SWIFT_SWIFT3_OBJC_INFERENCE = Default; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 5.0; }; name = QADeployment; }; @@ -663,8 +665,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "com.walmartlabs.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_SWIFT3_OBJC_INFERENCE = Default; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 5.0; }; name = QADeployment; }; @@ -831,6 +832,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; @@ -879,7 +881,7 @@ ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 3.0.1; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; @@ -890,6 +892,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; @@ -932,7 +935,7 @@ MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - SWIFT_VERSION = 3.0.1; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; VALIDATE_PRODUCT = YES; VERSIONING_SYSTEM = "apple-generic"; @@ -955,7 +958,7 @@ PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; SWIFT_SWIFT3_OBJC_INFERENCE = Default; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 5.0; }; name = Debug; }; @@ -974,7 +977,7 @@ PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; SWIFT_SWIFT3_OBJC_INFERENCE = Default; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 5.0; }; name = Release; }; @@ -991,8 +994,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "com.walmartlabs.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_SWIFT3_OBJC_INFERENCE = Default; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 5.0; }; name = Debug; }; @@ -1005,8 +1007,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "com.walmartlabs.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_SWIFT3_OBJC_INFERENCE = Default; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 5.0; }; name = Release; }; diff --git a/ELFoundation.xcodeproj/xcshareddata/xcschemes/ELFoundation.xcscheme b/ELFoundation.xcodeproj/xcshareddata/xcschemes/ELFoundation.xcscheme index f0ec313..79f39b1 100644 --- a/ELFoundation.xcodeproj/xcshareddata/xcschemes/ELFoundation.xcscheme +++ b/ELFoundation.xcodeproj/xcshareddata/xcschemes/ELFoundation.xcscheme @@ -1,6 +1,6 @@ String? { + func reverseBundleIdentifier() -> String? { if let id = bundleIdentifier { let components: [String] = id.components(separatedBy: ".") let reverseComponents = Array(components.reversed()) diff --git a/ELFoundation/Extensions/NSObject.swift b/ELFoundation/Extensions/NSObject.swift index 01dd8be..c943e72 100644 --- a/ELFoundation/Extensions/NSObject.swift +++ b/ELFoundation/Extensions/NSObject.swift @@ -10,12 +10,12 @@ import Foundation public extension NSObject { /// Returns the NSBundle containing self's class. - @objc public static func bundle() -> Bundle { + @objc static func bundle() -> Bundle { return Bundle(for: self) } /// Returns the NSBundle containing self's class. - @objc public func bundle() -> Bundle { + @objc func bundle() -> Bundle { return Swift.type(of: self).bundle() } } diff --git a/ELFoundation/Extensions/NSThread.swift b/ELFoundation/Extensions/NSThread.swift index 68fe9f0..ec4a67a 100644 --- a/ELFoundation/Extensions/NSThread.swift +++ b/ELFoundation/Extensions/NSThread.swift @@ -21,7 +21,7 @@ public extension Thread { - parameter locale: The locale for the date formatter. - returns: The date formatter. */ - public class func dateFormatter(_ format: String, locale: Locale? = Locale.current) -> DateFormatter { + class func dateFormatter(_ format: String, locale: Locale? = Locale.current) -> DateFormatter { let threadDictionary = Thread.current.threadDictionary var cache: Dictionary? = threadDictionary.object(forKey: formatterCacheKey) as? Dictionary diff --git a/ELFoundation/Utilities/Swizzling.swift b/ELFoundation/Utilities/Swizzling.swift index ffcb669..0258fec 100644 --- a/ELFoundation/Utilities/Swizzling.swift +++ b/ELFoundation/Utilities/Swizzling.swift @@ -17,7 +17,7 @@ import Foundation */ public extension NSObject { /// Swizzles a class method on an Objective-C object. - public class func swizzleClassMethod(_ originalSelector: Selector, swizzledSelector:Selector) { + class func swizzleClassMethod(_ originalSelector: Selector, swizzledSelector:Selector) { if let c: AnyClass = object_getClass(self) { let originalMethod = class_getClassMethod(c, originalSelector) let swizzledMethod = class_getClassMethod(c, swizzledSelector) @@ -33,7 +33,7 @@ public extension NSObject { } /// Swizzles an instance method on an Objective-C object. - public class func swizzleInstanceMethod(_ originalSelector: Selector, swizzledSelector:Selector) { + class func swizzleInstanceMethod(_ originalSelector: Selector, swizzledSelector:Selector) { let originalMethod = class_getInstanceMethod(self, originalSelector) let swizzledMethod = class_getInstanceMethod(self, swizzledSelector) diff --git a/ELFoundation_osx/Info.plist b/ELFoundation_osx/Info.plist index 9194b9b..3b36f0a 100644 --- a/ELFoundation_osx/Info.plist +++ b/ELFoundation_osx/Info.plist @@ -15,13 +15,13 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 3.0.0 + 3.1.0 CFBundleSignature ???? CFBundleVersion $(CURRENT_PROJECT_VERSION) NSHumanReadableCopyright - Copyright © 2015 WalmartLabs. All rights reserved. + Copyright © 2019 WalmartLabs. All rights reserved. NSPrincipalClass diff --git a/README.md b/README.md index 3162d21..cc9961e 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ ELFoundation is a collection of Swift utilities for iOS development. ## Requirements -ELFoundation requires Swift 4 and Xcode 9.2. +ELFoundation requires Swift 5 and Xcode 10.2. ## Installation