Skip to content

Commit

Permalink
Update to Swift 5
Browse files Browse the repository at this point in the history
  • Loading branch information
JanGorman committed Mar 26, 2019
1 parent 36cb7ed commit 931afb5
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -129,18 +129,18 @@
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0700;
LastUpgradeCheck = 0930;
LastUpgradeCheck = 1020;
ORGANIZATIONNAME = Schnaub;
TargetAttributes = {
F2AB59081B28B3B3001DCC74 = {
CreatedOnToolsVersion = 6.3.2;
LastSwiftMigration = "";
LastSwiftMigration = 1020;
};
};
};
buildConfigurationList = F2AB59041B28B3B3001DCC74 /* Build configuration list for PBXProject "SwiftMessageBarExample" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
en,
Expand Down Expand Up @@ -229,6 +229,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;
Expand Down Expand Up @@ -285,6 +286,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;
Expand Down Expand Up @@ -339,7 +341,7 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "com.schnaub.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
};
name = Debug;
};
Expand All @@ -352,7 +354,7 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "com.schnaub.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
};
name = Release;
};
Expand Down
6 changes: 3 additions & 3 deletions SwiftMessageBar.podspec
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
Pod::Spec.new do |s|

s.name = 'SwiftMessageBar'
s.version = '5.4.2'
s.version = '5.5.0'
s.summary = 'A Swift Message Bar'
s.swift_version = '4.2'
s.swift_version = '5.0'

s.description = <<-DESC
A longer description of SwiftMessageBar in Markdown format.
Expand All @@ -19,7 +19,7 @@ Pod::Spec.new do |s|
s.authors = { 'Jan Gorman' => 'https://github.com/JanGorman/', 'Ramy Kfoury' => 'https://github.com/ramy-kfoury/' }
s.social_media_url = 'http://twitter.com/JanGorman'

s.platform = :ios, '9.0'
s.platform = :ios, '10.0'

s.source = { :git => 'https://github.com/JanGorman/SwiftMessageBar.git', :tag => s.version }

Expand Down
13 changes: 8 additions & 5 deletions SwiftMessageBar.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -144,21 +144,22 @@
attributes = {
LastSwiftMigration = 0700;
LastSwiftUpdateCheck = 0700;
LastUpgradeCheck = 0930;
LastUpgradeCheck = 1020;
ORGANIZATIONNAME = Schnaub;
TargetAttributes = {
F2AB58E11B28B33C001DCC74 = {
CreatedOnToolsVersion = 6.3.2;
LastSwiftMigration = 1000;
LastSwiftMigration = 1020;
};
};
};
buildConfigurationList = F2AB58DC1B28B33C001DCC74 /* Build configuration list for PBXProject "SwiftMessageBar" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
en,
Base,
);
mainGroup = F2AB58D81B28B33C001DCC74;
productRefGroup = F2AB58E31B28B33C001DCC74 /* Products */;
Expand Down Expand Up @@ -209,6 +210,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;
Expand Down Expand Up @@ -269,6 +271,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;
Expand Down Expand Up @@ -335,7 +338,7 @@
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
};
name = Debug;
};
Expand All @@ -355,7 +358,7 @@
PRODUCT_BUNDLE_IDENTIFIER = "com.schnaub.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
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 = "0930"
LastUpgradeVersion = "1020"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
8 changes: 4 additions & 4 deletions SwiftMessageBar/Message.swift
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,8 @@ final class Message: UIView {

if let title = title {
let attributes: [NSAttributedString.Key: Any] = [
.font : titleFont,
.foregroundColor: titleFontColor,
.font : titleFont!,
.foregroundColor: titleFontColor!,
.paragraphStyle: paragraphStyle
]
titleLabel.attributedText = NSAttributedString(string: title, attributes: attributes)
Expand All @@ -131,8 +131,8 @@ final class Message: UIView {

if let message = message {
let attributes: [NSAttributedString.Key: Any] = [
.font : messageFont,
.foregroundColor: messageFontColor,
.font : messageFont!,
.foregroundColor: messageFontColor!,
.paragraphStyle: paragraphStyle
]
messageLabel.attributedText = NSAttributedString(string: message, attributes: attributes)
Expand Down
4 changes: 2 additions & 2 deletions SwiftMessageBar/Queue.swift
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@ struct Queue<T: Equatable> {
}

mutating func removeElement(_ element: T) {
if let idx = left.index(of: element) {
if let idx = left.firstIndex(of: element) {
left.remove(at: idx)
}
if let idx = right.index(of: element) {
if let idx = right.firstIndex(of: element) {
right.remove(at: idx)
}
}
Expand Down

0 comments on commit 931afb5

Please sign in to comment.