Skip to content

Commit

Permalink
Merge pull request #64 from Nirma/swift_5
Browse files Browse the repository at this point in the history
Project modernization changes for swift 5
  • Loading branch information
Nirma authored Apr 8, 2019
2 parents 6b26533 + 883541a commit 3c8dbcf
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .swift-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.2
5.0
19 changes: 11 additions & 8 deletions Attributed.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -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 */;
Expand Down Expand Up @@ -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++";
Expand Down Expand Up @@ -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++";
Expand Down Expand Up @@ -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;
};
Expand All @@ -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;
};
Expand All @@ -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;
};
Expand All @@ -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;
};
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0940"
LastUpgradeVersion = "1020"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
2 changes: 1 addition & 1 deletion Attributed/Attributed.swift
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public protocol AttributedCompatible {
}

public extension AttributedCompatible {
public var at: Attributed<Self> {
var at: Attributed<Self> {
return Attributed(self)
}
}
Expand Down
4 changes: 2 additions & 2 deletions Attributed/String+Attributed.swift
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,15 @@ 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)
}

}

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)
Expand Down
4 changes: 2 additions & 2 deletions AttributedLib.podspec
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -18,7 +18,7 @@ to `NSAttributedString`.
s.author = { 'Nicholas Maccharoli' => '[email protected]' }
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'

Expand Down

0 comments on commit 3c8dbcf

Please sign in to comment.