Skip to content

Commit

Permalink
Fix Swift 5.1 and Xcode 11 Warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
davecom committed Sep 21, 2019
1 parent 5f5c2d6 commit 399c17c
Show file tree
Hide file tree
Showing 6 changed files with 43 additions and 53 deletions.
8 changes: 5 additions & 3 deletions SwiftGraph.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,7 @@
attributes = {
LastSwiftMigration = 0710;
LastSwiftUpdateCheck = 0820;
LastUpgradeCheck = 1020;
LastUpgradeCheck = 1100;
ORGANIZATIONNAME = "Oak Snow Consulting";
TargetAttributes = {
55E620011A194C80000A5F7B = {
Expand All @@ -457,10 +457,9 @@
};
buildConfigurationList = 55E61FFD1A194C7F000A5F7B /* Build configuration list for PBXProject "SwiftGraph" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
English,
en,
Base,
);
Expand Down Expand Up @@ -722,6 +721,7 @@
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_IDENTITY = "-";
COMBINE_HIDPI_IMAGES = YES;
INFOPLIST_FILE = SwiftGraphSampleApp/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
Expand All @@ -738,6 +738,7 @@
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_IDENTITY = "-";
COMBINE_HIDPI_IMAGES = YES;
INFOPLIST_FILE = SwiftGraphSampleApp/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
Expand Down Expand Up @@ -986,6 +987,7 @@
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_IDENTITY = "-";
COMBINE_HIDPI_IMAGES = YES;
INFOPLIST_FILE = SwiftGraphSampleApp/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
Expand Down
28 changes: 12 additions & 16 deletions SwiftGraph.xcodeproj/xcshareddata/xcschemes/SwiftGraph.xcscheme
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1020"
LastUpgradeVersion = "1100"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand All @@ -26,8 +26,17 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
codeCoverageEnabled = "YES"
shouldUseLaunchSchemeArgsEnv = "YES">
shouldUseLaunchSchemeArgsEnv = "YES"
codeCoverageEnabled = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "7985B8FA1E5A4FB800C100E7"
BuildableName = "SwiftGraph.framework"
BlueprintName = "SwiftGraph"
ReferencedContainer = "container:SwiftGraph.xcodeproj">
</BuildableReference>
</MacroExpansion>
<Testables>
<TestableReference
skipped = "NO">
Expand All @@ -40,17 +49,6 @@
</BuildableReference>
</TestableReference>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "7985B8FA1E5A4FB800C100E7"
BuildableName = "SwiftGraph.framework"
BlueprintName = "SwiftGraph"
ReferencedContainer = "container:SwiftGraph.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
Expand All @@ -71,8 +69,6 @@
ReferencedContainer = "container:SwiftGraph.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "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 = "1020"
LastUpgradeVersion = "1100"
version = "2.0">
<BuildAction
parallelizeBuildables = "YES"
Expand Down Expand Up @@ -40,9 +40,18 @@
buildConfiguration = "Performance Tests"
selectedDebuggerIdentifier = ""
selectedLauncherIdentifier = "Xcode.IDEFoundation.Launcher.PosixSpawn"
shouldUseLaunchSchemeArgsEnv = "YES"
disableMainThreadChecker = "YES"
systemAttachmentLifetime = "keepNever"
shouldUseLaunchSchemeArgsEnv = "YES">
systemAttachmentLifetime = "keepNever">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "7985B8FA1E5A4FB800C100E7"
BuildableName = "SwiftGraph.framework"
BlueprintName = "SwiftGraph"
ReferencedContainer = "container:SwiftGraph.xcodeproj">
</BuildableReference>
</MacroExpansion>
<Testables>
<TestableReference
skipped = "NO">
Expand All @@ -55,17 +64,6 @@
</BuildableReference>
</TestableReference>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "7985B8FA1E5A4FB800C100E7"
BuildableName = "SwiftGraph.framework"
BlueprintName = "SwiftGraph"
ReferencedContainer = "container:SwiftGraph.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Performance Tests"
Expand All @@ -89,8 +87,6 @@
ReferencedContainer = "container:SwiftGraph.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "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 = "1020"
LastUpgradeVersion = "1100"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand All @@ -27,6 +27,15 @@
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "55E620011A194C80000A5F7B"
BuildableName = "SwiftGraphSampleApp.app"
BlueprintName = "SwiftGraphSampleApp"
ReferencedContainer = "container:SwiftGraph.xcodeproj">
</BuildableReference>
</MacroExpansion>
<Testables>
<TestableReference
skipped = "NO">
Expand All @@ -39,17 +48,6 @@
</BuildableReference>
</TestableReference>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "55E620011A194C80000A5F7B"
BuildableName = "SwiftGraphSampleApp.app"
BlueprintName = "SwiftGraphSampleApp"
ReferencedContainer = "container:SwiftGraph.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
Expand All @@ -71,8 +69,6 @@
ReferencedContainer = "container:SwiftGraph.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
Expand Down
6 changes: 3 additions & 3 deletions Tests/SwiftGraphTests/DijkstraGraphTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ class DijkstraGraphTests: XCTestCase {
XCTAssertFalse(distances.isEmpty, "Dijkstra result set is empty.")

//create map of distances to city names
var nameDistance: [String: Int?] = distanceArrayToVertexDict(distances: distances, graph: cityGraph)
let nameDistance: [String: Int?] = distanceArrayToVertexDict(distances: distances, graph: cityGraph)
if let temp = nameDistance["San Francisco"] {
XCTAssertEqual(temp!, 3057, "San Francisco should be 3057 miles away.")
} else {
Expand Down Expand Up @@ -168,7 +168,7 @@ class DijkstraGraphTests: XCTestCase {
XCTAssertFalse(distances.isEmpty, "Dijkstra result set is empty.")

//create map of distances to city names
var nameDistance: [String: Int?] = distanceArrayToVertexDict(distances: distances, graph: cityGraph)
let nameDistance: [String: Int?] = distanceArrayToVertexDict(distances: distances, graph: cityGraph)
if let temp = nameDistance["Seattle"] {
XCTAssertEqual(temp!, 3455, "Seattle should be 3455 miles away.")
} else {
Expand Down Expand Up @@ -207,7 +207,7 @@ class DijkstraGraphTests: XCTestCase {
XCTAssertFalse(distances.isEmpty, "Dijkstra result set is empty.")

//create map of distances to city names
var nameDistance: [String: Int?] = distanceArrayToVertexDict(distances: distances, graph: cityGraph2)
let nameDistance: [String: Int?] = distanceArrayToVertexDict(distances: distances, graph: cityGraph2)
if let temp = nameDistance["Seattle"] {
XCTAssertEqual(temp!, 2929, "Seattle should be 2929 miles away.")
} else {
Expand Down
2 changes: 1 addition & 1 deletion Tests/SwiftGraphTests/SwiftGraphCodableTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ extension SwiftGraphCodableTests {
XCTAssertFalse(distances.isEmpty, "Dijkstra result set is empty.")

//create map of distances to city names
var nameDistance: [SwiftGraphCodableTests_Vertex: Int?] = distanceArrayToVertexDict(distances: distances, graph: cityGraph)
let nameDistance: [SwiftGraphCodableTests_Vertex: Int?] = distanceArrayToVertexDict(distances: distances, graph: cityGraph)
if let temp = nameDistance[vertexWithName("San Francisco")] {
XCTAssertEqual(temp!, 3057, "San Francisco should be 3057 miles away.")
} else {
Expand Down

0 comments on commit 399c17c

Please sign in to comment.