From 20964294debb8ddcf1c49763e3f83e0d95c6eb78 Mon Sep 17 00:00:00 2001 From: Luke Lapresi Date: Tue, 12 Dec 2017 13:02:01 -0500 Subject: [PATCH 1/3] Marked xcproject schema as "shared" so that Carthage will automatically build and place in "Carthage/Build" folder --- .../xcshareddata/xcschemes/ThemeKit.xcscheme | 82 +++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 ThemeKit.xcodeproj/xcshareddata/xcschemes/ThemeKit.xcscheme diff --git a/ThemeKit.xcodeproj/xcshareddata/xcschemes/ThemeKit.xcscheme b/ThemeKit.xcodeproj/xcshareddata/xcschemes/ThemeKit.xcscheme new file mode 100644 index 0000000..d81e06c --- /dev/null +++ b/ThemeKit.xcodeproj/xcshareddata/xcschemes/ThemeKit.xcscheme @@ -0,0 +1,82 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From 97e56f2abc5152c85a33c20f7d218a54dadca96f Mon Sep 17 00:00:00 2001 From: Luke Lapresi Date: Tue, 12 Dec 2017 13:03:57 -0500 Subject: [PATCH 2/3] Fixed warnings related to using String.characters.count instead of String.count in Swift 4 --- Sources/NSDictionary+UserTheme.swift | 14 +++++++------- Sources/String+Substring.swift | 4 ++-- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Sources/NSDictionary+UserTheme.swift b/Sources/NSDictionary+UserTheme.swift index 5dbc947..b7fed1e 100644 --- a/Sources/NSDictionary+UserTheme.swift +++ b/Sources/NSDictionary+UserTheme.swift @@ -91,7 +91,7 @@ extension NSDictionary { // Resolve any variables var evaluatedStringValue = stringValue var rangeOffset = 0 - NSDictionary.varsRegExpr?.enumerateMatches(in: stringValue, options: NSRegularExpression.MatchingOptions(rawValue: UInt(0)), range: NSMakeRange(0, stringValue.characters.count), using: { (match, flags, stop) in + NSDictionary.varsRegExpr?.enumerateMatches(in: stringValue, options: NSRegularExpression.MatchingOptions(rawValue: UInt(0)), range: NSMakeRange(0, stringValue.count), using: { (match, flags, stop) in if let matchRange = match?.range(at: 1) { var range = matchRange range.location += rangeOffset @@ -99,7 +99,7 @@ extension NSDictionary { // Extract variable let start = range.location + 1 let end = start + range.length - 2 - guard start < evaluatedStringValue.characters.count && end < evaluatedStringValue.characters.count else { return } + guard start < evaluatedStringValue.count && end < evaluatedStringValue.count else { return } let variable = evaluatedStringValue[start.. String { - guard withNSRange.location < self.characters.count else { return "" } + guard withNSRange.location < self.count else { return "" } let start = self.index(self.startIndex, offsetBy: withNSRange.location) let end = self.index(start, offsetBy: withNSRange.length) let range = Range(uncheckedBounds: (lower: start, upper: end)) @@ -39,7 +39,7 @@ extension String { /// Convenience function to replace characters with NSRange. internal func replacingCharacters(inNSRange: NSRange, with: String) -> String { - guard inNSRange.location < self.characters.count else { return "" } + guard inNSRange.location < self.count else { return "" } let start = self.index(self.startIndex, offsetBy: inNSRange.location) let end = self.index(start, offsetBy: inNSRange.length) let range = Range(uncheckedBounds: (lower: start, upper: end)) From 6f2037d045ff4e9816dff62e7bb1c4b467b372ef Mon Sep 17 00:00:00 2001 From: llapresi Date: Tue, 12 Dec 2017 13:09:31 -0500 Subject: [PATCH 3/3] Update macOSThemeKit.podspec --- macOSThemeKit.podspec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/macOSThemeKit.podspec b/macOSThemeKit.podspec index f891590..4c4afd2 100644 --- a/macOSThemeKit.podspec +++ b/macOSThemeKit.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'macOSThemeKit' - s.version = '1.1.0' + s.version = '1.1.1' s.license = { :type => 'MIT', :file => 'LICENSE' } s.summary = 'macOS Theming Framework' s.homepage = 'https://github.com/luckymarmot/ThemeKit' @@ -15,4 +15,4 @@ Pod::Spec.new do |s| s.requires_arc = true s.source_files = 'Sources/**/*.swift' -end \ No newline at end of file +end