Skip to content

Commit 0e5a70c

Browse files
authored
3.1.0 (#17)
* Convert to Swift 4.2 * Update podspec * Update README * Update Travis yml * Update Xcode version on readme * Update Podspec
1 parent d3ad75e commit 0e5a70c

21 files changed

+88
-84
lines changed

.travis.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,15 @@
22
# * http://www.objc.io/issue-6/travis-ci.html
33
# * https://github.com/supermarin/xcpretty#usage
44

5-
osx_image: xcode9.4
5+
osx_image: xcode10
66
language: objective-c
77

88
env:
99
- DESTINATION='platform=iOS Simulator,name=iPhone 6S,OS=9.3'
1010
- DESTINATION='platform=iOS Simulator,name=iPhone 7,OS=10.3.1'
1111
- DESTINATION='platform=iOS Simulator,name=iPhone 8,OS=11.4'
1212
- DESTINATION='platform=iOS Simulator,name=iPhone X,OS=11.4'
13+
- DESTINATION='platform=iOS Simulator,name=iPhone X,OS=12.0'
1314

1415
script:
1516
- set -o pipefail && xcodebuild test -enableCodeCoverage YES -workspace Example/OKTableViewLiaison.xcworkspace -scheme OKTableViewLiaison-Example -destination "$DESTINATION" | xcpretty

Example/OKTableViewLiaison.xcodeproj/project.pbxproj

+5-7
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@
353353
607FACE41AFB9204008FA782 = {
354354
CreatedOnToolsVersion = 6.3.1;
355355
DevelopmentTeam = 886ZPWDXTP;
356-
LastSwiftMigration = 0900;
356+
LastSwiftMigration = 1000;
357357
TestTargetID = 607FACCF1AFB9204008FA782;
358358
};
359359
};
@@ -661,7 +661,7 @@
661661
PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.$(PRODUCT_NAME:rfc1034identifier)";
662662
PRODUCT_NAME = "$(TARGET_NAME)";
663663
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
664-
SWIFT_VERSION = 4.0;
664+
SWIFT_VERSION = 4.2;
665665
};
666666
name = Debug;
667667
};
@@ -677,7 +677,7 @@
677677
PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.$(PRODUCT_NAME:rfc1034identifier)";
678678
PRODUCT_NAME = "$(TARGET_NAME)";
679679
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
680-
SWIFT_VERSION = 4.0;
680+
SWIFT_VERSION = 4.2;
681681
};
682682
name = Release;
683683
};
@@ -695,8 +695,7 @@
695695
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
696696
PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.$(PRODUCT_NAME:rfc1034identifier)";
697697
PRODUCT_NAME = "$(TARGET_NAME)";
698-
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
699-
SWIFT_VERSION = 4.0;
698+
SWIFT_VERSION = 4.2;
700699
};
701700
name = Debug;
702701
};
@@ -710,8 +709,7 @@
710709
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
711710
PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.$(PRODUCT_NAME:rfc1034identifier)";
712711
PRODUCT_NAME = "$(TARGET_NAME)";
713-
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
714-
SWIFT_VERSION = 4.0;
712+
SWIFT_VERSION = 4.2;
715713
};
716714
name = Release;
717715
};

Example/OKTableViewLiaison/AppDelegate.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ import UIKit
1212
class AppDelegate: UIResponder, UIApplicationDelegate {
1313

1414
var window: UIWindow?
15-
16-
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
15+
16+
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool {
1717
return true
1818
}
1919

Example/OKTableViewLiaison/Factories/TextTableViewRowFactory.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,12 @@ enum TextTableViewRowFactory {
3333
cell.contentTextLabel.numberOfLines = 0
3434
cell.selectionStyle = .none
3535

36-
let mediumAttributes: [NSAttributedStringKey: Any] = [
36+
let mediumAttributes: [NSAttributedString.Key: Any] = [
3737
.font: UIFont.systemFont(ofSize: 13, weight: .medium),
3838
.foregroundColor: UIColor.black
3939
]
4040

41-
let regularAttributes: [NSAttributedStringKey: Any] = [
41+
let regularAttributes: [NSAttributedString.Key: Any] = [
4242
.font: UIFont.systemFont(ofSize: 13),
4343
.foregroundColor: UIColor.black
4444
]

Example/Pods/Pods.xcodeproj/project.pbxproj

+14-9
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Example/Tests/OKTableViewLiaison+UnitTests.swift

+4-4
Original file line numberDiff line numberDiff line change
@@ -1139,7 +1139,7 @@ final class OKTableViewLiaison_UnitTests: XCTestCase {
11391139

11401140
XCTAssertEqual(row1Height, 100)
11411141
XCTAssertEqual(row2Height, 200)
1142-
XCTAssertEqual(row3Height, UITableViewAutomaticDimension)
1142+
XCTAssertEqual(row3Height, UITableView.automaticDimension)
11431143
}
11441144

11451145
func test_estimatedHeightForRow_properlySetsEstimatedHeightsForRows() {
@@ -1162,7 +1162,7 @@ final class OKTableViewLiaison_UnitTests: XCTestCase {
11621162

11631163
XCTAssertEqual(row1Height, 100)
11641164
XCTAssertEqual(row2Height, 200)
1165-
XCTAssertEqual(row3Height, UITableViewAutomaticDimension)
1165+
XCTAssertEqual(row3Height, UITableView.automaticDimension)
11661166
}
11671167

11681168
func test_shouldIndentWhileEditingRow_correctlyReturnsIfRowShouldIndentWhileBeingEdited() {
@@ -1277,7 +1277,7 @@ final class OKTableViewLiaison_UnitTests: XCTestCase {
12771277

12781278
XCTAssertEqual(section1Height, 100)
12791279
XCTAssertEqual(section2Height, 200)
1280-
XCTAssertEqual(section3Height, UITableViewAutomaticDimension)
1280+
XCTAssertEqual(section3Height, UITableView.automaticDimension)
12811281
}
12821282

12831283
func test_estimatedHeightForHeader_properlySetsEstimatedHeightsForSectionHeaders() {
@@ -1335,7 +1335,7 @@ final class OKTableViewLiaison_UnitTests: XCTestCase {
13351335

13361336
XCTAssertEqual(section1Height, 100)
13371337
XCTAssertEqual(section2Height, 200)
1338-
XCTAssertEqual(section3Height, UITableViewAutomaticDimension)
1338+
XCTAssertEqual(section3Height, UITableView.automaticDimension)
13391339
}
13401340

13411341
func test_estimatedHeightForFooter_properlySetsEstimatedHeightsForSectionFooters() {

Example/Tests/OKTableViewRow+UnitTests.swift

+4-4
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ final class OKTableViewRow_UnitTests: XCTestCase {
5858

5959
func test_setHeight_returnsAutomaticDimensionForSelfSizingRow() {
6060
let row = TestTableViewRow()
61-
XCTAssertEqual(row.height, UITableViewAutomaticDimension)
62-
XCTAssertEqual(row.estimatedHeight, UITableViewAutomaticDimension)
61+
XCTAssertEqual(row.height, UITableView.automaticDimension)
62+
XCTAssertEqual(row.estimatedHeight, UITableView.automaticDimension)
6363
}
6464

6565
func test_removeHeight_removesAPreviouslySetHeight() {
@@ -71,8 +71,8 @@ final class OKTableViewRow_UnitTests: XCTestCase {
7171
row.remove(height: .height)
7272
row.remove(height: .estimatedHeight)
7373

74-
XCTAssertEqual(row.height, UITableViewAutomaticDimension)
75-
XCTAssertEqual(row.estimatedHeight, UITableViewAutomaticDimension)
74+
XCTAssertEqual(row.height, UITableView.automaticDimension)
75+
XCTAssertEqual(row.estimatedHeight, UITableView.automaticDimension)
7676
}
7777

7878
func test_setPrefetchCommand_setPrefetchCommandClosure() {

Example/Tests/OKTableViewSection+UnitTests.swift

+4-4
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,8 @@ final class OKTableViewSection_UnitTests: XCTestCase {
8181
let section = OKTableViewSection(componentDisplayOption: .both(headerComponent: TestTableViewSectionComponent(),
8282
footerComponent: TestTableViewSectionComponent()))
8383

84-
XCTAssertEqual(section.calculate(height: .height, for: .header), UITableViewAutomaticDimension)
85-
XCTAssertEqual(section.calculate(height: .height, for: .footer), UITableViewAutomaticDimension)
84+
XCTAssertEqual(section.calculate(height: .height, for: .header), UITableView.automaticDimension)
85+
XCTAssertEqual(section.calculate(height: .height, for: .footer), UITableView.automaticDimension)
8686
}
8787

8888
func test_calculateHeight_returnsZeroForNonSetEstimatedSupplementaryViewsHeights() {
@@ -130,8 +130,8 @@ final class OKTableViewSection_UnitTests: XCTestCase {
130130
header.remove(height: .estimatedHeight)
131131
footer.remove(height: .estimatedHeight)
132132

133-
XCTAssertEqual(section.calculate(height: .height, for: .header), UITableViewAutomaticDimension)
134-
XCTAssertEqual(section.calculate(height: .height, for: .footer), UITableViewAutomaticDimension)
133+
XCTAssertEqual(section.calculate(height: .height, for: .header), UITableView.automaticDimension)
134+
XCTAssertEqual(section.calculate(height: .height, for: .footer), UITableView.automaticDimension)
135135
XCTAssertEqual(section.calculate(height: .estimatedHeight, for: .header), 0)
136136
XCTAssertEqual(section.calculate(height: .estimatedHeight, for: .footer), 0)
137137
}

0 commit comments

Comments
 (0)