diff --git a/.swift-version b/.swift-version index bf77d54..819e07a 100644 --- a/.swift-version +++ b/.swift-version @@ -1 +1 @@ -4.2 +5.0 diff --git a/Attributed.xcodeproj/project.pbxproj b/Attributed.xcodeproj/project.pbxproj index 6d69995..52c209b 100644 --- a/Attributed.xcodeproj/project.pbxproj +++ b/Attributed.xcodeproj/project.pbxproj @@ -196,27 +196,28 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 0810; - LastUpgradeCheck = 0940; + LastUpgradeCheck = 1020; ORGANIZATIONNAME = Attributed; TargetAttributes = { AAEE626C1DF8F3690079C70C = { CreatedOnToolsVersion = 8.1; - LastSwiftMigration = 1000; + LastSwiftMigration = 1020; ProvisioningStyle = Automatic; }; AAEE62751DF8F3690079C70C = { CreatedOnToolsVersion = 8.1; - LastSwiftMigration = 1000; + LastSwiftMigration = 1020; ProvisioningStyle = Automatic; }; }; }; buildConfigurationList = AAEE62671DF8F3690079C70C /* Build configuration list for PBXProject "Attributed" */; compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; + developmentRegion = en; hasScannedForEncodings = 0; knownRegions = ( en, + Base, ); mainGroup = AAEE62631DF8F3690079C70C; productRefGroup = AAEE626E1DF8F3690079C70C /* Products */; @@ -284,6 +285,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; @@ -346,6 +348,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; @@ -413,7 +416,7 @@ PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 5.0; }; name = Debug; }; @@ -432,7 +435,7 @@ PRODUCT_BUNDLE_IDENTIFIER = attributed.Attributed; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 5.0; }; name = Release; }; @@ -444,7 +447,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = attributed.AttributedTests; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 5.0; }; name = Debug; }; @@ -456,7 +459,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = attributed.AttributedTests; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 5.0; }; name = Release; }; diff --git a/Attributed.xcodeproj/xcshareddata/xcschemes/Attributed.xcscheme b/Attributed.xcodeproj/xcshareddata/xcschemes/Attributed.xcscheme index 0f37944..88771fe 100644 --- a/Attributed.xcodeproj/xcshareddata/xcschemes/Attributed.xcscheme +++ b/Attributed.xcodeproj/xcshareddata/xcschemes/Attributed.xcscheme @@ -1,6 +1,6 @@ { + var at: Attributed { return Attributed(self) } } diff --git a/Attributed/String+Attributed.swift b/Attributed/String+Attributed.swift index 267836b..ef02c25 100644 --- a/Attributed/String+Attributed.swift +++ b/Attributed/String+Attributed.swift @@ -41,7 +41,7 @@ extension Attributed where Base == String { public extension Attributed where Base == NSMutableAttributedString { - public func add(_ attributes: Attributes, to range: NSRange) { + func add(_ attributes: Attributes, to range: NSRange) { base.addAttributes(attributes.dictionary, range: range) } @@ -49,7 +49,7 @@ public extension Attributed where Base == NSMutableAttributedString { public extension Attributed where Base == NSAttributedString { - public func modified(with attributes: Attributes, for range: NSRange) -> NSAttributedString { + func modified(with attributes: Attributes, for range: NSRange) -> NSAttributedString { let string = base as NSAttributedString let result = NSMutableAttributedString(attributedString: string) diff --git a/AttributedLib.podspec b/AttributedLib.podspec index 69d30e0..920632f 100644 --- a/AttributedLib.podspec +++ b/AttributedLib.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'AttributedLib' - s.version = '2.2.1' + s.version = '3.0.0' s.summary = 'Modern Swift µframework for attributed strings.' s.description = <<-DESC @@ -18,7 +18,7 @@ to `NSAttributedString`. s.author = { 'Nicholas Maccharoli' => 'nmaccharoli@gmail.com' } s.source = { :git => 'https://github.com/Nirma/Attributed.git', :tag => s.version.to_s } - s.swift_version = "4.2" + s.swift_version = "5.0" s.ios.deployment_target = '9.0' s.source_files = 'Attributed/*.swift'