Skip to content

Commit

Permalink
Merge pull request #185 from mattiashagstrand/xcode-10
Browse files Browse the repository at this point in the history
Update project for Xcode 10 and Swift 4.2
  • Loading branch information
JohnSundell committed Nov 7, 2018
2 parents 81680b7 + 079eff8 commit 95c9694
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 31 deletions.
2 changes: 1 addition & 1 deletion .swift-version
@@ -1 +1 @@
4.1
4.2
2 changes: 1 addition & 1 deletion .travis.yml
@@ -1,4 +1,4 @@
language: objective-c
osx_image: xcode9.3
osx_image: xcode10.1
script:
- bundle exec fastlane tests
32 changes: 14 additions & 18 deletions ImagineEngine.xcodeproj/project.pbxproj
Expand Up @@ -926,11 +926,11 @@
};
52D6D97B1BEFF229002C0205 = {
CreatedOnToolsVersion = 7.1;
LastSwiftMigration = 0900;
LastSwiftMigration = 1000;
};
52D6D9851BEFF229002C0205 = {
CreatedOnToolsVersion = 7.1;
LastSwiftMigration = 0900;
LastSwiftMigration = 1000;
};
};
};
Expand Down Expand Up @@ -1451,7 +1451,7 @@
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = macosx;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 4.2;
};
name = Debug;
};
Expand All @@ -1475,7 +1475,7 @@
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = macosx;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 4.2;
};
name = Release;
};
Expand Down Expand Up @@ -1503,7 +1503,7 @@
SDKROOT = appletvos;
SKIP_INSTALL = YES;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 4.2;
TARGETED_DEVICE_FAMILY = 3;
TVOS_DEPLOYMENT_TARGET = 10.0;
};
Expand Down Expand Up @@ -1533,7 +1533,7 @@
SDKROOT = appletvos;
SKIP_INSTALL = YES;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 4.2;
TARGETED_DEVICE_FAMILY = 3;
TVOS_DEPLOYMENT_TARGET = 10.0;
};
Expand All @@ -1557,7 +1557,7 @@
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = appletvos;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 4.2;
TARGETED_DEVICE_FAMILY = 3;
TVOS_DEPLOYMENT_TARGET = 11.0;
};
Expand All @@ -1581,7 +1581,7 @@
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = appletvos;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 4.2;
TARGETED_DEVICE_FAMILY = 3;
TVOS_DEPLOYMENT_TARGET = 11.0;
};
Expand Down Expand Up @@ -1718,8 +1718,7 @@
SKIP_INSTALL = YES;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 4.2;
};
name = Debug;
};
Expand All @@ -1741,8 +1740,7 @@
PRODUCT_NAME = ImagineEngine;
SKIP_INSTALL = YES;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 4.2;
};
name = Release;
};
Expand All @@ -1757,8 +1755,7 @@
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 4.2;
};
name = Debug;
};
Expand All @@ -1772,8 +1769,7 @@
PRODUCT_BUNDLE_IDENTIFIER = "com.ImagineEngine.ImagineEngine-iOS-Tests";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 4.2;
};
name = Release;
};
Expand All @@ -1800,7 +1796,7 @@
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 4.2;
VALID_ARCHS = x86_64;
};
name = Debug;
Expand All @@ -1826,7 +1822,7 @@
SKIP_INSTALL = YES;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 4.2;
VALID_ARCHS = x86_64;
};
name = Release;
Expand Down
10 changes: 5 additions & 5 deletions Sources/Core/API/Label.swift
Expand Up @@ -205,16 +205,16 @@ public extension Label {
}

private extension Label.HorizontalAlignment {
var mode: String {
var mode: CATextLayerAlignmentMode {
switch self {
case .left:
return kCAAlignmentLeft
return .left
case .center:
return kCAAlignmentCenter
return .center
case .right:
return kCAAlignmentRight
return .right
case .justified:
return kCAAlignmentJustified
return .justified
}
}
}
4 changes: 2 additions & 2 deletions Sources/Core/Internal/DisplayLink-iOS+tvOS.swift
Expand Up @@ -12,11 +12,11 @@ internal final class DisplayLink: DisplayLinkProtocol {
private lazy var link = makeLink()

deinit {
link.remove(from: .main, forMode: .commonModes)
link.remove(from: .main, forMode: .common)
}

func activate() {
link.add(to: .main, forMode: .commonModes)
link.add(to: .main, forMode: .common)
}

// MARK: - Private
Expand Down
4 changes: 2 additions & 2 deletions Sources/Integrations/UIKit/GameViewController-iOS+tvOS.swift
Expand Up @@ -57,13 +57,13 @@ public class GameViewController: UIViewController {

notificationCenter.addObserver(self,
selector: #selector(applicationDidBecomeActive),
name: .UIApplicationDidBecomeActive,
name: UIApplication.didBecomeActiveNotification,
object: nil
)

notificationCenter.addObserver(self,
selector: #selector(applicationWillBecomeInactive),
name: .UIApplicationWillResignActive,
name: UIApplication.willResignActiveNotification,
object: nil
)
}
Expand Down
4 changes: 2 additions & 2 deletions Tests/ImagineEngineTests/LabelTests.swift
Expand Up @@ -54,10 +54,10 @@ final class LabelTests: XCTestCase {

func testSettingHorizontalAlignment() {
// Make sure that "left" is the default
XCTAssertEqual(label.layer.alignmentMode, kCAAlignmentLeft)
XCTAssertEqual(label.layer.alignmentMode, .left)

label.horizontalAlignment = .right
XCTAssertEqual(label.layer.alignmentMode, kCAAlignmentRight)
XCTAssertEqual(label.layer.alignmentMode, .right)
}

func testAddingAndRemovingPlugin() {
Expand Down

0 comments on commit 95c9694

Please sign in to comment.