Skip to content

Commit 399c17c

Browse files
committed
Fix Swift 5.1 and Xcode 11 Warnings
1 parent 5f5c2d6 commit 399c17c

File tree

6 files changed

+43
-53
lines changed

6 files changed

+43
-53
lines changed

SwiftGraph.xcodeproj/project.pbxproj

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,7 @@
436436
attributes = {
437437
LastSwiftMigration = 0710;
438438
LastSwiftUpdateCheck = 0820;
439-
LastUpgradeCheck = 1020;
439+
LastUpgradeCheck = 1100;
440440
ORGANIZATIONNAME = "Oak Snow Consulting";
441441
TargetAttributes = {
442442
55E620011A194C80000A5F7B = {
@@ -457,10 +457,9 @@
457457
};
458458
buildConfigurationList = 55E61FFD1A194C7F000A5F7B /* Build configuration list for PBXProject "SwiftGraph" */;
459459
compatibilityVersion = "Xcode 3.2";
460-
developmentRegion = English;
460+
developmentRegion = en;
461461
hasScannedForEncodings = 0;
462462
knownRegions = (
463-
English,
464463
en,
465464
Base,
466465
);
@@ -722,6 +721,7 @@
722721
buildSettings = {
723722
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
724723
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
724+
CODE_SIGN_IDENTITY = "-";
725725
COMBINE_HIDPI_IMAGES = YES;
726726
INFOPLIST_FILE = SwiftGraphSampleApp/Info.plist;
727727
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
@@ -738,6 +738,7 @@
738738
buildSettings = {
739739
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
740740
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
741+
CODE_SIGN_IDENTITY = "-";
741742
COMBINE_HIDPI_IMAGES = YES;
742743
INFOPLIST_FILE = SwiftGraphSampleApp/Info.plist;
743744
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
@@ -986,6 +987,7 @@
986987
buildSettings = {
987988
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
988989
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
990+
CODE_SIGN_IDENTITY = "-";
989991
COMBINE_HIDPI_IMAGES = YES;
990992
INFOPLIST_FILE = SwiftGraphSampleApp/Info.plist;
991993
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";

SwiftGraph.xcodeproj/xcshareddata/xcschemes/SwiftGraph.xcscheme

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "1020"
3+
LastUpgradeVersion = "1100"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"
@@ -26,8 +26,17 @@
2626
buildConfiguration = "Debug"
2727
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
2828
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
29-
codeCoverageEnabled = "YES"
30-
shouldUseLaunchSchemeArgsEnv = "YES">
29+
shouldUseLaunchSchemeArgsEnv = "YES"
30+
codeCoverageEnabled = "YES">
31+
<MacroExpansion>
32+
<BuildableReference
33+
BuildableIdentifier = "primary"
34+
BlueprintIdentifier = "7985B8FA1E5A4FB800C100E7"
35+
BuildableName = "SwiftGraph.framework"
36+
BlueprintName = "SwiftGraph"
37+
ReferencedContainer = "container:SwiftGraph.xcodeproj">
38+
</BuildableReference>
39+
</MacroExpansion>
3140
<Testables>
3241
<TestableReference
3342
skipped = "NO">
@@ -40,17 +49,6 @@
4049
</BuildableReference>
4150
</TestableReference>
4251
</Testables>
43-
<MacroExpansion>
44-
<BuildableReference
45-
BuildableIdentifier = "primary"
46-
BlueprintIdentifier = "7985B8FA1E5A4FB800C100E7"
47-
BuildableName = "SwiftGraph.framework"
48-
BlueprintName = "SwiftGraph"
49-
ReferencedContainer = "container:SwiftGraph.xcodeproj">
50-
</BuildableReference>
51-
</MacroExpansion>
52-
<AdditionalOptions>
53-
</AdditionalOptions>
5452
</TestAction>
5553
<LaunchAction
5654
buildConfiguration = "Debug"
@@ -71,8 +69,6 @@
7169
ReferencedContainer = "container:SwiftGraph.xcodeproj">
7270
</BuildableReference>
7371
</MacroExpansion>
74-
<AdditionalOptions>
75-
</AdditionalOptions>
7672
</LaunchAction>
7773
<ProfileAction
7874
buildConfiguration = "Release"

SwiftGraph.xcodeproj/xcshareddata/xcschemes/SwiftGraphPerformanceTests.xcscheme

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "1020"
3+
LastUpgradeVersion = "1100"
44
version = "2.0">
55
<BuildAction
66
parallelizeBuildables = "YES"
@@ -40,9 +40,18 @@
4040
buildConfiguration = "Performance Tests"
4141
selectedDebuggerIdentifier = ""
4242
selectedLauncherIdentifier = "Xcode.IDEFoundation.Launcher.PosixSpawn"
43+
shouldUseLaunchSchemeArgsEnv = "YES"
4344
disableMainThreadChecker = "YES"
44-
systemAttachmentLifetime = "keepNever"
45-
shouldUseLaunchSchemeArgsEnv = "YES">
45+
systemAttachmentLifetime = "keepNever">
46+
<MacroExpansion>
47+
<BuildableReference
48+
BuildableIdentifier = "primary"
49+
BlueprintIdentifier = "7985B8FA1E5A4FB800C100E7"
50+
BuildableName = "SwiftGraph.framework"
51+
BlueprintName = "SwiftGraph"
52+
ReferencedContainer = "container:SwiftGraph.xcodeproj">
53+
</BuildableReference>
54+
</MacroExpansion>
4655
<Testables>
4756
<TestableReference
4857
skipped = "NO">
@@ -55,17 +64,6 @@
5564
</BuildableReference>
5665
</TestableReference>
5766
</Testables>
58-
<MacroExpansion>
59-
<BuildableReference
60-
BuildableIdentifier = "primary"
61-
BlueprintIdentifier = "7985B8FA1E5A4FB800C100E7"
62-
BuildableName = "SwiftGraph.framework"
63-
BlueprintName = "SwiftGraph"
64-
ReferencedContainer = "container:SwiftGraph.xcodeproj">
65-
</BuildableReference>
66-
</MacroExpansion>
67-
<AdditionalOptions>
68-
</AdditionalOptions>
6967
</TestAction>
7068
<LaunchAction
7169
buildConfiguration = "Performance Tests"
@@ -89,8 +87,6 @@
8987
ReferencedContainer = "container:SwiftGraph.xcodeproj">
9088
</BuildableReference>
9189
</MacroExpansion>
92-
<AdditionalOptions>
93-
</AdditionalOptions>
9490
</LaunchAction>
9591
<ProfileAction
9692
buildConfiguration = "Release"

SwiftGraph.xcodeproj/xcshareddata/xcschemes/SwiftGraphSampleApp.xcscheme

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "1020"
3+
LastUpgradeVersion = "1100"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"
@@ -27,6 +27,15 @@
2727
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
2828
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
2929
shouldUseLaunchSchemeArgsEnv = "YES">
30+
<MacroExpansion>
31+
<BuildableReference
32+
BuildableIdentifier = "primary"
33+
BlueprintIdentifier = "55E620011A194C80000A5F7B"
34+
BuildableName = "SwiftGraphSampleApp.app"
35+
BlueprintName = "SwiftGraphSampleApp"
36+
ReferencedContainer = "container:SwiftGraph.xcodeproj">
37+
</BuildableReference>
38+
</MacroExpansion>
3039
<Testables>
3140
<TestableReference
3241
skipped = "NO">
@@ -39,17 +48,6 @@
3948
</BuildableReference>
4049
</TestableReference>
4150
</Testables>
42-
<MacroExpansion>
43-
<BuildableReference
44-
BuildableIdentifier = "primary"
45-
BlueprintIdentifier = "55E620011A194C80000A5F7B"
46-
BuildableName = "SwiftGraphSampleApp.app"
47-
BlueprintName = "SwiftGraphSampleApp"
48-
ReferencedContainer = "container:SwiftGraph.xcodeproj">
49-
</BuildableReference>
50-
</MacroExpansion>
51-
<AdditionalOptions>
52-
</AdditionalOptions>
5351
</TestAction>
5452
<LaunchAction
5553
buildConfiguration = "Debug"
@@ -71,8 +69,6 @@
7169
ReferencedContainer = "container:SwiftGraph.xcodeproj">
7270
</BuildableReference>
7371
</BuildableProductRunnable>
74-
<AdditionalOptions>
75-
</AdditionalOptions>
7672
</LaunchAction>
7773
<ProfileAction
7874
buildConfiguration = "Release"

Tests/SwiftGraphTests/DijkstraGraphTests.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ class DijkstraGraphTests: XCTestCase {
9595
XCTAssertFalse(distances.isEmpty, "Dijkstra result set is empty.")
9696

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

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

209209
//create map of distances to city names
210-
var nameDistance: [String: Int?] = distanceArrayToVertexDict(distances: distances, graph: cityGraph2)
210+
let nameDistance: [String: Int?] = distanceArrayToVertexDict(distances: distances, graph: cityGraph2)
211211
if let temp = nameDistance["Seattle"] {
212212
XCTAssertEqual(temp!, 2929, "Seattle should be 2929 miles away.")
213213
} else {

Tests/SwiftGraphTests/SwiftGraphCodableTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ extension SwiftGraphCodableTests {
137137
XCTAssertFalse(distances.isEmpty, "Dijkstra result set is empty.")
138138

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

0 commit comments

Comments
 (0)