Skip to content

Commit 931afb5

Browse files
committed
Update to Swift 5
1 parent 36cb7ed commit 931afb5

File tree

6 files changed

+25
-20
lines changed

6 files changed

+25
-20
lines changed

Example/SwiftMessageBarExample/SwiftMessageBarExample.xcodeproj/project.pbxproj

+7-5
Original file line numberDiff line numberDiff line change
@@ -129,18 +129,18 @@
129129
isa = PBXProject;
130130
attributes = {
131131
LastSwiftUpdateCheck = 0700;
132-
LastUpgradeCheck = 0930;
132+
LastUpgradeCheck = 1020;
133133
ORGANIZATIONNAME = Schnaub;
134134
TargetAttributes = {
135135
F2AB59081B28B3B3001DCC74 = {
136136
CreatedOnToolsVersion = 6.3.2;
137-
LastSwiftMigration = "";
137+
LastSwiftMigration = 1020;
138138
};
139139
};
140140
};
141141
buildConfigurationList = F2AB59041B28B3B3001DCC74 /* Build configuration list for PBXProject "SwiftMessageBarExample" */;
142142
compatibilityVersion = "Xcode 3.2";
143-
developmentRegion = English;
143+
developmentRegion = en;
144144
hasScannedForEncodings = 0;
145145
knownRegions = (
146146
en,
@@ -229,6 +229,7 @@
229229
isa = XCBuildConfiguration;
230230
buildSettings = {
231231
ALWAYS_SEARCH_USER_PATHS = NO;
232+
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
232233
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
233234
CLANG_CXX_LIBRARY = "libc++";
234235
CLANG_ENABLE_MODULES = YES;
@@ -285,6 +286,7 @@
285286
isa = XCBuildConfiguration;
286287
buildSettings = {
287288
ALWAYS_SEARCH_USER_PATHS = NO;
289+
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
288290
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
289291
CLANG_CXX_LIBRARY = "libc++";
290292
CLANG_ENABLE_MODULES = YES;
@@ -339,7 +341,7 @@
339341
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
340342
PRODUCT_BUNDLE_IDENTIFIER = "com.schnaub.$(PRODUCT_NAME:rfc1034identifier)";
341343
PRODUCT_NAME = "$(TARGET_NAME)";
342-
SWIFT_VERSION = 4.2;
344+
SWIFT_VERSION = 5.0;
343345
};
344346
name = Debug;
345347
};
@@ -352,7 +354,7 @@
352354
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
353355
PRODUCT_BUNDLE_IDENTIFIER = "com.schnaub.$(PRODUCT_NAME:rfc1034identifier)";
354356
PRODUCT_NAME = "$(TARGET_NAME)";
355-
SWIFT_VERSION = 4.2;
357+
SWIFT_VERSION = 5.0;
356358
};
357359
name = Release;
358360
};

SwiftMessageBar.podspec

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
Pod::Spec.new do |s|
22

33
s.name = 'SwiftMessageBar'
4-
s.version = '5.4.2'
4+
s.version = '5.5.0'
55
s.summary = 'A Swift Message Bar'
6-
s.swift_version = '4.2'
6+
s.swift_version = '5.0'
77

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

22-
s.platform = :ios, '9.0'
22+
s.platform = :ios, '10.0'
2323

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

SwiftMessageBar.xcodeproj/project.pbxproj

+8-5
Original file line numberDiff line numberDiff line change
@@ -144,21 +144,22 @@
144144
attributes = {
145145
LastSwiftMigration = 0700;
146146
LastSwiftUpdateCheck = 0700;
147-
LastUpgradeCheck = 0930;
147+
LastUpgradeCheck = 1020;
148148
ORGANIZATIONNAME = Schnaub;
149149
TargetAttributes = {
150150
F2AB58E11B28B33C001DCC74 = {
151151
CreatedOnToolsVersion = 6.3.2;
152-
LastSwiftMigration = 1000;
152+
LastSwiftMigration = 1020;
153153
};
154154
};
155155
};
156156
buildConfigurationList = F2AB58DC1B28B33C001DCC74 /* Build configuration list for PBXProject "SwiftMessageBar" */;
157157
compatibilityVersion = "Xcode 3.2";
158-
developmentRegion = English;
158+
developmentRegion = en;
159159
hasScannedForEncodings = 0;
160160
knownRegions = (
161161
en,
162+
Base,
162163
);
163164
mainGroup = F2AB58D81B28B33C001DCC74;
164165
productRefGroup = F2AB58E31B28B33C001DCC74 /* Products */;
@@ -209,6 +210,7 @@
209210
isa = XCBuildConfiguration;
210211
buildSettings = {
211212
ALWAYS_SEARCH_USER_PATHS = NO;
213+
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
212214
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
213215
CLANG_CXX_LIBRARY = "libc++";
214216
CLANG_ENABLE_MODULES = YES;
@@ -269,6 +271,7 @@
269271
isa = XCBuildConfiguration;
270272
buildSettings = {
271273
ALWAYS_SEARCH_USER_PATHS = NO;
274+
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
272275
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
273276
CLANG_CXX_LIBRARY = "libc++";
274277
CLANG_ENABLE_MODULES = YES;
@@ -335,7 +338,7 @@
335338
PRODUCT_NAME = "$(TARGET_NAME)";
336339
SKIP_INSTALL = YES;
337340
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
338-
SWIFT_VERSION = 4.2;
341+
SWIFT_VERSION = 5.0;
339342
};
340343
name = Debug;
341344
};
@@ -355,7 +358,7 @@
355358
PRODUCT_BUNDLE_IDENTIFIER = "com.schnaub.$(PRODUCT_NAME:rfc1034identifier)";
356359
PRODUCT_NAME = "$(TARGET_NAME)";
357360
SKIP_INSTALL = YES;
358-
SWIFT_VERSION = 4.2;
361+
SWIFT_VERSION = 5.0;
359362
};
360363
name = Release;
361364
};

SwiftMessageBar.xcodeproj/xcshareddata/xcschemes/SwiftMessageBar.xcscheme

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "0930"
3+
LastUpgradeVersion = "1020"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"

SwiftMessageBar/Message.swift

+4-4
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,8 @@ final class Message: UIView {
116116

117117
if let title = title {
118118
let attributes: [NSAttributedString.Key: Any] = [
119-
.font : titleFont,
120-
.foregroundColor: titleFontColor,
119+
.font : titleFont!,
120+
.foregroundColor: titleFontColor!,
121121
.paragraphStyle: paragraphStyle
122122
]
123123
titleLabel.attributedText = NSAttributedString(string: title, attributes: attributes)
@@ -131,8 +131,8 @@ final class Message: UIView {
131131

132132
if let message = message {
133133
let attributes: [NSAttributedString.Key: Any] = [
134-
.font : messageFont,
135-
.foregroundColor: messageFontColor,
134+
.font : messageFont!,
135+
.foregroundColor: messageFontColor!,
136136
.paragraphStyle: paragraphStyle
137137
]
138138
messageLabel.attributedText = NSAttributedString(string: message, attributes: attributes)

SwiftMessageBar/Queue.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,10 @@ struct Queue<T: Equatable> {
3838
}
3939

4040
mutating func removeElement(_ element: T) {
41-
if let idx = left.index(of: element) {
41+
if let idx = left.firstIndex(of: element) {
4242
left.remove(at: idx)
4343
}
44-
if let idx = right.index(of: element) {
44+
if let idx = right.firstIndex(of: element) {
4545
right.remove(at: idx)
4646
}
4747
}

0 commit comments

Comments
 (0)