Convert to Swift 4.2

This commit is contained in:
Dmitry Preobrazhenskiy 2018-11-15 23:26:01 +03:00
parent 424ab6c944
commit 4ca2710faa
2 changed files with 5 additions and 4 deletions

View File

@ -537,7 +537,7 @@
TargetAttributes = {
572EF2181B51F16C00EEBB58 = {
CreatedOnToolsVersion = 6.4;
LastSwiftMigration = 0920;
LastSwiftMigration = 1010;
};
572EF2231B51F16C00EEBB58 = {
CreatedOnToolsVersion = 6.4;
@ -889,7 +889,7 @@
SKIP_INSTALL = YES;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_SWIFT3_OBJC_INFERENCE = On;
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 4.2;
TARGETED_DEVICE_FAMILY = "1,2";
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
@ -941,7 +941,7 @@
SDKROOT = iphoneos;
SKIP_INSTALL = YES;
SWIFT_SWIFT3_OBJC_INFERENCE = On;
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 4.2;
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES;
VERSIONING_SYSTEM = "apple-generic";

View File

@ -226,7 +226,8 @@ public final class SocketEngine : NSObject, URLSessionDelegate, SocketEnginePoll
private func handleBase64(message: String) {
// binary in base64 string
let noPrefix = String(message[message.index(message.startIndex, offsetBy: 2)..<message.endIndex])
if let data = NSData(base64Encoded: noPrefix, options: .ignoreUnknownCharacters) {
if let data = Data(base64Encoded: noPrefix, options: .ignoreUnknownCharacters) {
client?.parseEngineBinaryData(data as Data)
}
}