Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Fixes for Xcode 12 Beta 5
  • Loading branch information
Vkt0r committed Aug 25, 2020
commit 14334e0318a919fec72d3adc85aff66b80c31a73
2 changes: 1 addition & 1 deletion XCode/Sources/HttpResponse.swift
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public enum HttpResponse {
case movedTemporarily(String)
case badRequest(HttpResponseBody?), unauthorized, forbidden, notFound
case internalServerError
case raw(Int, String, [String:String]?, ((HttpResponseBodyWriter) throws -> Void)? )
case raw(Int, String, [String: String]?, ((HttpResponseBodyWriter) throws -> Void)? )

public var statusCode: Int {
switch self {
Expand Down
1 change: 0 additions & 1 deletion XCode/Sources/HttpServerIO.swift
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,6 @@ open class HttpServerIO {
}
} catch {
print("Failed to send response: \(error)")
break
}
if let session = response.socketSession() {
delegate?.socketConnectionReceived(socket)
Expand Down
12 changes: 7 additions & 5 deletions XCode/Swifter.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -629,7 +629,7 @@
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 1010;
LastUpgradeCheck = 1110;
LastUpgradeCheck = 1200;
ORGANIZATIONNAME = "Damian Kołakowski";
TargetAttributes = {
043660C121FED34100497989 = {
Expand Down Expand Up @@ -1143,7 +1143,7 @@
GCC_NO_COMMON_BLOCKS = YES;
INFOPLIST_FILE = SwifteriOS/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
MTL_ENABLE_DEBUG_INFO = YES;
PRODUCT_BUNDLE_IDENTIFIER = pl.kolakowski.SwifteriOS;
Expand All @@ -1170,7 +1170,7 @@
GCC_NO_COMMON_BLOCKS = YES;
INFOPLIST_FILE = SwifteriOS/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
MTL_ENABLE_DEBUG_INFO = NO;
PRODUCT_BUNDLE_IDENTIFIER = pl.kolakowski.SwifteriOS;
Expand Down Expand Up @@ -1263,6 +1263,7 @@
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
Expand All @@ -1288,7 +1289,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
MACOSX_DEPLOYMENT_TARGET = 10.10;
METAL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
Expand Down Expand Up @@ -1325,6 +1326,7 @@
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
Expand All @@ -1343,7 +1345,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
MACOSX_DEPLOYMENT_TARGET = 10.10;
METAL_ENABLE_DEBUG_INFO = NO;
ONLY_ACTIVE_ARCH = NO;
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 = "1110"
LastUpgradeVersion = "1200"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand All @@ -27,15 +27,6 @@
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "7AE893FA1C0512C400A29F63"
BuildableName = "Swifter.framework"
BlueprintName = "SwifterMac"
ReferencedContainer = "container:Swifter.xcodeproj">
</BuildableReference>
</MacroExpansion>
<Testables>
<TestableReference
skipped = "NO">
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 = "1110"
LastUpgradeVersion = "1200"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
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 = "1110"
LastUpgradeVersion = "1200"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand All @@ -27,15 +27,6 @@
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "7AE893E61C05127900A29F63"
BuildableName = "Swifter.framework"
BlueprintName = "SwifteriOS"
ReferencedContainer = "container:Swifter.xcodeproj">
</BuildableReference>
</MacroExpansion>
<Testables>
<TestableReference
skipped = "NO">
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 = "1110"
LastUpgradeVersion = "1200"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
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 = "1110"
LastUpgradeVersion = "1200"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
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 = "1110"
LastUpgradeVersion = "1200"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand All @@ -27,15 +27,6 @@
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "269B47861D3AAAE20042D137"
BuildableName = "Swifter.framework"
BlueprintName = "SwiftertvOS"
ReferencedContainer = "container:Swifter.xcodeproj">
</BuildableReference>
</MacroExpansion>
<Testables>
<TestableReference
skipped = "NO">
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 = "1110"
LastUpgradeVersion = "1200"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
4 changes: 3 additions & 1 deletion XCode/SwifterSampleiOS/ViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@ class ViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
do {
let port: in_port_t = 9080
let server = demoServer(Bundle.main.resourcePath!)
try server.start(9080)
try server.start(port)
print("Starting server at port \(port) 🚀.")
self.server = server
} catch {
print("Server start error: \(error)")
Expand Down
4 changes: 2 additions & 2 deletions XCode/Tests/SwifterTestsHttpParser.swift
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class SwifterTestsHttpParser: XCTestCase {
_ = fcntl(fdRead, F_SETFL, O_NONBLOCK)

// Push the content bytes into the write socket.
_ = content.withCString { stringPointer in
content.withCString { stringPointer in
// Count will be either >=0 to indicate bytes written, or -1
// if the bytes will be written later (non-blocking).
let count = write(fdWrite, stringPointer, content.lengthOfBytes(using: .utf8) + 1)
Expand All @@ -50,7 +50,7 @@ class SwifterTestsHttpParser: XCTestCase {
}
}

// swiftlint:disable function_body_length
// swiftlint:disable function_body_length cyclomatic_complexity
func testParser() {
let parser = HttpParser()

Expand Down
2 changes: 1 addition & 1 deletion XCode/Tests/SwifterTestsWebSocketSession.swift
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class SwifterTestsWebSocketSession: XCTestCase {
}
}

// swiftlint:disable function_body_length
// swiftlint:disable function_body_length cyclomatic_complexity
func testParser() {

do {
Expand Down