Skip to content

Commit

Permalink
Upgrade to Swift 4
Browse files Browse the repository at this point in the history
  • Loading branch information
SteveBarnegren committed Oct 19, 2017
1 parent e2782cc commit 5b6255f
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 10 deletions.
10 changes: 6 additions & 4 deletions Example/Example.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -313,10 +313,12 @@
67A9CA131DE64DAA00510FB8 = {
CreatedOnToolsVersion = 8.0;
DevelopmentTeam = VAA3W4LPY2;
LastSwiftMigration = 0900;
ProvisioningStyle = Automatic;
};
67A9CA261DE64DAA00510FB8 = {
CreatedOnToolsVersion = 8.0;
LastSwiftMigration = 0900;
ProvisioningStyle = Automatic;
TestTargetID = 67A9CA131DE64DAA00510FB8;
};
Expand Down Expand Up @@ -576,7 +578,7 @@
PRODUCT_BUNDLE_IDENTIFIER = SteveBarnegren.SwiftChessExample;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_VERSION = 3.0;
SWIFT_VERSION = 4.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
Expand All @@ -595,7 +597,7 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = SteveBarnegren.SwiftChessExample;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 3.0;
SWIFT_VERSION = 4.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Release;
Expand All @@ -615,7 +617,7 @@
PRODUCT_BUNDLE_IDENTIFIER = SteveBarnegren.SwiftChessExampleTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_VERSION = 3.0;
SWIFT_VERSION = 4.0;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/SwiftChessExample.app/SwiftChessExample";
};
name = Debug;
Expand All @@ -633,7 +635,7 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = SteveBarnegren.SwiftChessExampleTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 3.0;
SWIFT_VERSION = 4.0;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/SwiftChessExample.app/SwiftChessExample";
};
name = Release;
Expand Down
2 changes: 1 addition & 1 deletion Example/SwiftChess/GameViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ extension GameViewController: GameDelegate {
updateCastleButtonsVisibility()
}

func tellAIToTakeGo() {
@objc func tellAIToTakeGo() {

if let player = game.currentPlayer as? AIPlayer {
activityIndicator.startAnimating();
Expand Down
2 changes: 1 addition & 1 deletion Example/SwiftChess/PromotionSelectionViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ class PromotionSelectionViewController: UIViewController {

// MARK: - Actions

func buttonPressed(sender: UIButton) {
@objc func buttonPressed(sender: UIButton) {

let index = buttons.index(of: sender)!
print("Button pressed at index: \(index)")
Expand Down
14 changes: 10 additions & 4 deletions SwiftChess/SwiftChess.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -251,10 +251,12 @@
TargetAttributes = {
67A9C9DD1DE64CD200510FB8 = {
CreatedOnToolsVersion = 8.0;
LastSwiftMigration = 0900;
ProvisioningStyle = Automatic;
};
67A9C9E61DE64CD300510FB8 = {
CreatedOnToolsVersion = 8.0;
LastSwiftMigration = 0900;
ProvisioningStyle = Automatic;
};
};
Expand Down Expand Up @@ -469,7 +471,8 @@
PRODUCT_BUNDLE_IDENTIFIER = SteveBarnegren.SwiftChess;
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
SWIFT_VERSION = 3.0;
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
SWIFT_VERSION = 4.0;
};
name = Debug;
};
Expand All @@ -487,7 +490,8 @@
PRODUCT_BUNDLE_IDENTIFIER = SteveBarnegren.SwiftChess;
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
SWIFT_VERSION = 3.0;
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
SWIFT_VERSION = 4.0;
};
name = Release;
};
Expand All @@ -499,7 +503,8 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = SteveBarnegren.SwiftChessTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 3.0;
SWIFT_SWIFT3_OBJC_INFERENCE = On;
SWIFT_VERSION = 4.0;
};
name = Debug;
};
Expand All @@ -511,7 +516,8 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = SteveBarnegren.SwiftChessTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 3.0;
SWIFT_SWIFT3_OBJC_INFERENCE = On;
SWIFT_VERSION = 4.0;
};
name = Release;
};
Expand Down

0 comments on commit 5b6255f

Please sign in to comment.