Skip to content

Commit 24312d2

Browse files
author
Gleb Radchenko
committed
Swift 4.2; XCode 10 changes
1 parent e4659f3 commit 24312d2

File tree

16 files changed

+97
-49
lines changed

16 files changed

+97
-49
lines changed

DNWebSocket.xcodeproj/project.pbxproj

Lines changed: 68 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,6 @@
137137
F7B141C42029DDA700E49DB5 /* URL+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = F7B141C32029DDA700E49DB5 /* URL+Extensions.swift */; };
138138
F7B141C52029DDA700E49DB5 /* URL+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = F7B141C32029DDA700E49DB5 /* URL+Extensions.swift */; };
139139
F7B141C62029DDA700E49DB5 /* URL+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = F7B141C32029DDA700E49DB5 /* URL+Extensions.swift */; };
140-
F7B141CE2029EF0800E49DB5 /* test.plist in Resources */ = {isa = PBXBuildFile; fileRef = F7B141CD2029EF0800E49DB5 /* test.plist */; };
141-
F7B141CF2029EF0800E49DB5 /* test.plist in Resources */ = {isa = PBXBuildFile; fileRef = F7B141CD2029EF0800E49DB5 /* test.plist */; };
142140
F7B141FA202A1C9E00E49DB5 /* StreamBuffer.swift in Sources */ = {isa = PBXBuildFile; fileRef = F7B141F9202A1C9E00E49DB5 /* StreamBuffer.swift */; };
143141
F7B141FB202A1C9E00E49DB5 /* StreamBuffer.swift in Sources */ = {isa = PBXBuildFile; fileRef = F7B141F9202A1C9E00E49DB5 /* StreamBuffer.swift */; };
144142
F7B141FC202A1C9E00E49DB5 /* StreamBuffer.swift in Sources */ = {isa = PBXBuildFile; fileRef = F7B141F9202A1C9E00E49DB5 /* StreamBuffer.swift */; };
@@ -621,7 +619,7 @@
621619
isa = PBXProject;
622620
attributes = {
623621
LastSwiftUpdateCheck = 0920;
624-
LastUpgradeCheck = 0920;
622+
LastUpgradeCheck = 1000;
625623
TargetAttributes = {
626624
F715B171202F2AEB008FEB01 = {
627625
CreatedOnToolsVersion = 9.2;
@@ -642,6 +640,7 @@
642640
};
643641
F781C73B2024B2670009B0D4 = {
644642
CreatedOnToolsVersion = 9.2;
643+
LastSwiftMigration = 1000;
645644
ProvisioningStyle = Automatic;
646645
};
647646
F7A65F1B202C861100F190CB = {
@@ -692,15 +691,13 @@
692691
isa = PBXResourcesBuildPhase;
693692
buildActionMask = 2147483647;
694693
files = (
695-
F7B141CE2029EF0800E49DB5 /* test.plist in Resources */,
696694
);
697695
runOnlyForDeploymentPostprocessing = 0;
698696
};
699697
F781C7232024AF2D0009B0D4 /* Resources */ = {
700698
isa = PBXResourcesBuildPhase;
701699
buildActionMask = 2147483647;
702700
files = (
703-
F7B141CF2029EF0800E49DB5 /* test.plist in Resources */,
704701
);
705702
runOnlyForDeploymentPostprocessing = 0;
706703
};
@@ -1010,7 +1007,7 @@
10101007
SKIP_INSTALL = YES;
10111008
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
10121009
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
1013-
SWIFT_VERSION = 4.0;
1010+
SWIFT_VERSION = 4.2;
10141011
TARGETED_DEVICE_FAMILY = 4;
10151012
VERSIONING_SYSTEM = "apple-generic";
10161013
VERSION_INFO_PREFIX = "";
@@ -1078,7 +1075,7 @@
10781075
SDKROOT = watchos;
10791076
SKIP_INSTALL = YES;
10801077
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
1081-
SWIFT_VERSION = 4.0;
1078+
SWIFT_VERSION = 4.2;
10821079
TARGETED_DEVICE_FAMILY = 4;
10831080
VALIDATE_PRODUCT = YES;
10841081
VERSIONING_SYSTEM = "apple-generic";
@@ -1154,7 +1151,7 @@
11541151
SKIP_INSTALL = YES;
11551152
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
11561153
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
1157-
SWIFT_VERSION = 4.0;
1154+
SWIFT_VERSION = 4.2;
11581155
TARGETED_DEVICE_FAMILY = 3;
11591156
TVOS_DEPLOYMENT_TARGET = 9.0;
11601157
VERSIONING_SYSTEM = "apple-generic";
@@ -1221,7 +1218,7 @@
12211218
SDKROOT = appletvos;
12221219
SKIP_INSTALL = YES;
12231220
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
1224-
SWIFT_VERSION = 4.0;
1221+
SWIFT_VERSION = 4.2;
12251222
TARGETED_DEVICE_FAMILY = 3;
12261223
TVOS_DEPLOYMENT_TARGET = 9.0;
12271224
VALIDATE_PRODUCT = YES;
@@ -1235,6 +1232,33 @@
12351232
buildSettings = {
12361233
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO;
12371234
CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = YES;
1235+
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
1236+
CLANG_WARN_BOOL_CONVERSION = YES;
1237+
CLANG_WARN_COMMA = YES;
1238+
CLANG_WARN_CONSTANT_CONVERSION = YES;
1239+
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
1240+
CLANG_WARN_EMPTY_BODY = YES;
1241+
CLANG_WARN_ENUM_CONVERSION = YES;
1242+
CLANG_WARN_INFINITE_RECURSION = YES;
1243+
CLANG_WARN_INT_CONVERSION = YES;
1244+
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
1245+
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
1246+
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
1247+
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
1248+
CLANG_WARN_STRICT_PROTOTYPES = YES;
1249+
CLANG_WARN_SUSPICIOUS_MOVE = YES;
1250+
CLANG_WARN_UNREACHABLE_CODE = YES;
1251+
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
1252+
ENABLE_STRICT_OBJC_MSGSEND = YES;
1253+
ENABLE_TESTABILITY = YES;
1254+
GCC_NO_COMMON_BLOCKS = YES;
1255+
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
1256+
GCC_WARN_ABOUT_RETURN_TYPE = YES;
1257+
GCC_WARN_UNDECLARED_SELECTOR = YES;
1258+
GCC_WARN_UNINITIALIZED_AUTOS = YES;
1259+
GCC_WARN_UNUSED_FUNCTION = YES;
1260+
GCC_WARN_UNUSED_VARIABLE = YES;
1261+
ONLY_ACTIVE_ARCH = YES;
12381262
PRODUCT_NAME = "$(PROJECT_NAME)";
12391263
SWIFT_INCLUDE_PATHS = "Sources/CZLib Sources/CommonCrypto";
12401264
};
@@ -1245,6 +1269,31 @@
12451269
buildSettings = {
12461270
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO;
12471271
CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = YES;
1272+
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
1273+
CLANG_WARN_BOOL_CONVERSION = YES;
1274+
CLANG_WARN_COMMA = YES;
1275+
CLANG_WARN_CONSTANT_CONVERSION = YES;
1276+
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
1277+
CLANG_WARN_EMPTY_BODY = YES;
1278+
CLANG_WARN_ENUM_CONVERSION = YES;
1279+
CLANG_WARN_INFINITE_RECURSION = YES;
1280+
CLANG_WARN_INT_CONVERSION = YES;
1281+
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
1282+
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
1283+
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
1284+
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
1285+
CLANG_WARN_STRICT_PROTOTYPES = YES;
1286+
CLANG_WARN_SUSPICIOUS_MOVE = YES;
1287+
CLANG_WARN_UNREACHABLE_CODE = YES;
1288+
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
1289+
ENABLE_STRICT_OBJC_MSGSEND = YES;
1290+
GCC_NO_COMMON_BLOCKS = YES;
1291+
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
1292+
GCC_WARN_ABOUT_RETURN_TYPE = YES;
1293+
GCC_WARN_UNDECLARED_SELECTOR = YES;
1294+
GCC_WARN_UNINITIALIZED_AUTOS = YES;
1295+
GCC_WARN_UNUSED_FUNCTION = YES;
1296+
GCC_WARN_UNUSED_VARIABLE = YES;
12481297
PRODUCT_NAME = "$(PROJECT_NAME)";
12491298
SWIFT_INCLUDE_PATHS = "Sources/CZLib Sources/CommonCrypto";
12501299
};
@@ -1280,7 +1329,7 @@
12801329
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
12811330
CLANG_WARN_UNREACHABLE_CODE = YES;
12821331
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
1283-
CODE_SIGN_IDENTITY = "iPhone Developer";
1332+
CODE_SIGN_IDENTITY = "";
12841333
CODE_SIGN_STYLE = Automatic;
12851334
COPY_PHASE_STRIP = NO;
12861335
CURRENT_PROJECT_VERSION = 1;
@@ -1317,7 +1366,7 @@
13171366
SKIP_INSTALL = YES;
13181367
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
13191368
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
1320-
SWIFT_VERSION = 4.0;
1369+
SWIFT_VERSION = 4.2;
13211370
TARGETED_DEVICE_FAMILY = "1,2";
13221371
VERSIONING_SYSTEM = "apple-generic";
13231372
VERSION_INFO_PREFIX = "";
@@ -1354,7 +1403,7 @@
13541403
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
13551404
CLANG_WARN_UNREACHABLE_CODE = YES;
13561405
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
1357-
CODE_SIGN_IDENTITY = "iPhone Developer";
1406+
CODE_SIGN_IDENTITY = "";
13581407
CODE_SIGN_STYLE = Automatic;
13591408
COPY_PHASE_STRIP = NO;
13601409
CURRENT_PROJECT_VERSION = 1;
@@ -1383,7 +1432,7 @@
13831432
SDKROOT = iphoneos;
13841433
SKIP_INSTALL = YES;
13851434
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
1386-
SWIFT_VERSION = 4.0;
1435+
SWIFT_VERSION = 4.2;
13871436
TARGETED_DEVICE_FAMILY = "1,2";
13881437
VALIDATE_PRODUCT = YES;
13891438
VERSIONING_SYSTEM = "apple-generic";
@@ -1422,7 +1471,7 @@
14221471
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
14231472
CLANG_WARN_UNREACHABLE_CODE = YES;
14241473
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
1425-
CODE_SIGN_IDENTITY = "Mac Developer";
1474+
CODE_SIGN_IDENTITY = "";
14261475
CODE_SIGN_STYLE = Automatic;
14271476
COMBINE_HIDPI_IMAGES = YES;
14281477
COPY_PHASE_STRIP = NO;
@@ -1461,7 +1510,7 @@
14611510
SKIP_INSTALL = YES;
14621511
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
14631512
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
1464-
SWIFT_VERSION = 4.0;
1513+
SWIFT_VERSION = 4.2;
14651514
VERSIONING_SYSTEM = "apple-generic";
14661515
VERSION_INFO_PREFIX = "";
14671516
};
@@ -1498,7 +1547,7 @@
14981547
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
14991548
CLANG_WARN_UNREACHABLE_CODE = YES;
15001549
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
1501-
CODE_SIGN_IDENTITY = "Mac Developer";
1550+
CODE_SIGN_IDENTITY = "";
15021551
CODE_SIGN_STYLE = Automatic;
15031552
COMBINE_HIDPI_IMAGES = YES;
15041553
COPY_PHASE_STRIP = NO;
@@ -1529,7 +1578,7 @@
15291578
SDKROOT = macosx;
15301579
SKIP_INSTALL = YES;
15311580
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
1532-
SWIFT_VERSION = 4.0;
1581+
SWIFT_VERSION = 4.2;
15331582
VERSIONING_SYSTEM = "apple-generic";
15341583
VERSION_INFO_PREFIX = "";
15351584
};
@@ -1595,7 +1644,7 @@
15951644
SDKROOT = macosx;
15961645
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
15971646
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
1598-
SWIFT_VERSION = 4.0;
1647+
SWIFT_VERSION = 4.2;
15991648
};
16001649
name = Debug;
16011650
};
@@ -1651,7 +1700,7 @@
16511700
PRODUCT_NAME = "$(TARGET_NAME)";
16521701
SDKROOT = macosx;
16531702
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
1654-
SWIFT_VERSION = 4.0;
1703+
SWIFT_VERSION = 4.2;
16551704
};
16561705
name = Release;
16571706
};
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>IDEDidComputeMac32BitWarning</key>
6+
<true/>
7+
</dict>
8+
</plist>

DNWebSocket.xcodeproj/xcshareddata/xcschemes/DNWebSocket-iOS.xcscheme

Lines changed: 1 addition & 3 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 = "0920"
3+
LastUpgradeVersion = "1000"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"
@@ -26,7 +26,6 @@
2626
buildConfiguration = "Debug"
2727
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
2828
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
29-
language = ""
3029
shouldUseLaunchSchemeArgsEnv = "YES">
3130
<Testables>
3231
</Testables>
@@ -37,7 +36,6 @@
3736
buildConfiguration = "Debug"
3837
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
3938
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
40-
language = ""
4139
launchStyle = "0"
4240
useCustomWorkingDirectory = "NO"
4341
ignoresPersistentStateOnLaunch = "NO"

DNWebSocket.xcodeproj/xcshareddata/xcschemes/DNWebSocket-macOS.xcscheme

Lines changed: 1 addition & 3 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 = "0920"
3+
LastUpgradeVersion = "1000"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"
@@ -26,7 +26,6 @@
2626
buildConfiguration = "Debug"
2727
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
2828
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
29-
language = ""
3029
shouldUseLaunchSchemeArgsEnv = "YES">
3130
<Testables>
3231
<TestableReference
@@ -56,7 +55,6 @@
5655
buildConfiguration = "Debug"
5756
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
5857
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
59-
language = ""
6058
launchStyle = "0"
6159
useCustomWorkingDirectory = "NO"
6260
ignoresPersistentStateOnLaunch = "NO"

DNWebSocket.xcodeproj/xcshareddata/xcschemes/DNWebSocket-tvOS.xcscheme

Lines changed: 1 addition & 3 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 = "0920"
3+
LastUpgradeVersion = "1000"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"
@@ -26,7 +26,6 @@
2626
buildConfiguration = "Debug"
2727
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
2828
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
29-
language = ""
3029
shouldUseLaunchSchemeArgsEnv = "YES">
3130
<Testables>
3231
</Testables>
@@ -37,7 +36,6 @@
3736
buildConfiguration = "Debug"
3837
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
3938
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
40-
language = ""
4139
launchStyle = "0"
4240
useCustomWorkingDirectory = "NO"
4341
ignoresPersistentStateOnLaunch = "NO"

DNWebSocket.xcodeproj/xcshareddata/xcschemes/DNWebSocket-watchOS.xcscheme

Lines changed: 1 addition & 3 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 = "0920"
3+
LastUpgradeVersion = "1000"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"
@@ -26,7 +26,6 @@
2626
buildConfiguration = "Debug"
2727
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
2828
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
29-
language = ""
3029
shouldUseLaunchSchemeArgsEnv = "YES">
3130
<Testables>
3231
</Testables>
@@ -37,7 +36,6 @@
3736
buildConfiguration = "Debug"
3837
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
3938
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
40-
language = ""
4139
launchStyle = "0"
4240
useCustomWorkingDirectory = "NO"
4341
ignoresPersistentStateOnLaunch = "NO"

Sources/CommonCrypto/module.modulemap

Lines changed: 0 additions & 5 deletions
This file was deleted.

Sources/CommonCrypto/shim.h

Lines changed: 0 additions & 1 deletion
This file was deleted.

Sources/Extensions/Data+Buffer.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ extension Data {
2323
}
2424

2525
mutating func unsafeMutableBuffer() -> UnsafeMutableBufferPointer<UInt8> {
26+
let count = self.count
2627
return withUnsafeMutableBytes { (pointer) in
2728
UnsafeMutableBufferPointer<UInt8>(start: pointer, count: count)
2829
}

Sources/Extensions/RunLoop+Timeout.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ extension RunLoop {
1515
var currentInterval = Date.timeIntervalSinceReferenceDate
1616

1717
while !predicate() && currentInterval < timeoutInterval {
18-
RunLoop.current.run(mode: .defaultRunLoopMode, before: Date(timeIntervalSinceNow: 0.1))
18+
RunLoop.current.run(mode: .default, before: Date(timeIntervalSinceNow: 0.1))
1919
currentInterval = Date.timeIntervalSinceReferenceDate
2020
}
2121

0 commit comments

Comments
 (0)