From 558fdeb7b600dfc9d21989f3b80d5ba40050f076 Mon Sep 17 00:00:00 2001 From: Quan Vo Date: Wed, 23 Aug 2017 11:36:57 -0500 Subject: [PATCH 1/7] Swift 4 support --- .swift-version | 2 +- Package.swift | 40 +++++++++++++++----- Sources/{ => Socket}/Info.plist | 0 Sources/{ => Socket}/Socket.h | 0 Sources/{ => Socket}/Socket.swift | 0 Sources/{ => Socket}/SocketProtocols.swift | 0 Sources/{ => Socket}/SocketUtils.swift | 0 Tests/SocketTests/VerifyLinuxTestCount.swift | 33 ++++++++-------- 8 files changed, 48 insertions(+), 27 deletions(-) rename Sources/{ => Socket}/Info.plist (100%) rename Sources/{ => Socket}/Socket.h (100%) rename Sources/{ => Socket}/Socket.swift (100%) rename Sources/{ => Socket}/SocketProtocols.swift (100%) rename Sources/{ => Socket}/SocketUtils.swift (100%) diff --git a/.swift-version b/.swift-version index 94ff29c..b7d9796 100644 --- a/.swift-version +++ b/.swift-version @@ -1 +1 @@ -3.1.1 +4.0-DEVELOPMENT-SNAPSHOT-2017-08-21-a diff --git a/Package.swift b/Package.swift index 2a1f4db..d7d1adc 100644 --- a/Package.swift +++ b/Package.swift @@ -1,8 +1,10 @@ +// swift-tools-version:4.0 +// The swift-tools-version declares the minimum version of Swift required to build this package. // // BlueSocket.swift // BlueSocket // -// Copyright © 2016 IBM. All rights reserved. +// Copyright © 2017 IBM. All rights reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -20,15 +22,33 @@ import PackageDescription #if os(Linux) || os(macOS) || os(iOS) || os(tvOS) || os(watchOS) - - let package = Package( - name: "Socket", - targets: [Target(name: "Socket")], - exclude: ["BlueSocket.xcodeproj", "BlueSocket.xcworkspace", "README.md", "Sources/Info.plist", "Sources/Socket.h"] - ) + +let package = Package( + name: "Socket", + products: [ + // Products define the executables and libraries produced by a package, and make them visible to other packages. + .library( + name: "Socket", + targets: ["Socket"]), + ], + dependencies: [ + // Dependencies declare other packages that this package depends on. + // .package(url: /* package url */, from: "1.0.0"), + ], + targets: [ + // Targets are the basic building blocks of a package. A target defines a module or a test suite. + // Targets can depend on other targets in this package, and on products in packages which this package depends on. + .target( + name: "Socket", + dependencies: []), + .testTarget( + name: "SocketTests", + dependencies: ["Socket"]), + ] +) #else - - fatalError("Unsupported OS") - + +fatalError("Unsupported OS") + #endif diff --git a/Sources/Info.plist b/Sources/Socket/Info.plist similarity index 100% rename from Sources/Info.plist rename to Sources/Socket/Info.plist diff --git a/Sources/Socket.h b/Sources/Socket/Socket.h similarity index 100% rename from Sources/Socket.h rename to Sources/Socket/Socket.h diff --git a/Sources/Socket.swift b/Sources/Socket/Socket.swift similarity index 100% rename from Sources/Socket.swift rename to Sources/Socket/Socket.swift diff --git a/Sources/SocketProtocols.swift b/Sources/Socket/SocketProtocols.swift similarity index 100% rename from Sources/SocketProtocols.swift rename to Sources/Socket/SocketProtocols.swift diff --git a/Sources/SocketUtils.swift b/Sources/Socket/SocketUtils.swift similarity index 100% rename from Sources/SocketUtils.swift rename to Sources/Socket/SocketUtils.swift diff --git a/Tests/SocketTests/VerifyLinuxTestCount.swift b/Tests/SocketTests/VerifyLinuxTestCount.swift index bcc6486..e25c1e7 100644 --- a/Tests/SocketTests/VerifyLinuxTestCount.swift +++ b/Tests/SocketTests/VerifyLinuxTestCount.swift @@ -14,19 +14,20 @@ * limitations under the License. **/ -#if os(macOS) - import XCTest - - class VerifyLinuxTestCount: XCTestCase { - - func testVerifyLinuxTestCount() { - var linuxCount: Int - var darwinCount: Int - - // SocketTests - linuxCount = SocketTests.allTests.count - darwinCount = Int(SocketTests.defaultTestSuite().testCaseCount) - XCTAssertEqual(linuxCount, darwinCount, "\(darwinCount - linuxCount) tests are missing from SocketTests.allTests") - } - } -#endif +// Does not work on Swift 4.0 +//#if os(macOS) +// import XCTest +// +// class VerifyLinuxTestCount: XCTestCase { +// +// func testVerifyLinuxTestCount() { +// var linuxCount: Int +// var darwinCount: Int +// +// // SocketTests +// linuxCount = SocketTests.allTests.count +// darwinCount = Int(SocketTests.defaultTestSuite.testCaseCount) +// XCTAssertEqual(linuxCount, darwinCount, "\(darwinCount - linuxCount) tests are missing from SocketTests.allTests") +// } +// } +//#endif From b13217e33c7434da21292f562832ee6e22d9d8c1 Mon Sep 17 00:00:00 2001 From: Quan Vo Date: Wed, 30 Aug 2017 13:55:26 -0500 Subject: [PATCH 2/7] Add Swift 4 support --- Package.swift | 52 +++++++++++++------------------------------ Package@swift-4.swift | 50 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 66 insertions(+), 36 deletions(-) create mode 100644 Package@swift-4.swift diff --git a/Package.swift b/Package.swift index d7d1adc..64ef66e 100644 --- a/Package.swift +++ b/Package.swift @@ -1,54 +1,34 @@ -// swift-tools-version:4.0 -// The swift-tools-version declares the minimum version of Swift required to build this package. // // BlueSocket.swift // BlueSocket // -// Copyright © 2017 IBM. All rights reserved. +// Copyright © 2016 IBM. All rights reserved. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// http://www.apache.org/licenses/LICENSE-2.0 // -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. // import PackageDescription #if os(Linux) || os(macOS) || os(iOS) || os(tvOS) || os(watchOS) - + let package = Package( name: "Socket", - products: [ - // Products define the executables and libraries produced by a package, and make them visible to other packages. - .library( - name: "Socket", - targets: ["Socket"]), - ], - dependencies: [ - // Dependencies declare other packages that this package depends on. - // .package(url: /* package url */, from: "1.0.0"), - ], - targets: [ - // Targets are the basic building blocks of a package. A target defines a module or a test suite. - // Targets can depend on other targets in this package, and on products in packages which this package depends on. - .target( - name: "Socket", - dependencies: []), - .testTarget( - name: "SocketTests", - dependencies: ["Socket"]), - ] + targets: [Target(name: "Socket")], + exclude: ["BlueSocket.xcodeproj", "BlueSocket.xcworkspace", "README.md", "Sources/Info.plist", "Sources/Socket.h"] ) - + #else - + fatalError("Unsupported OS") - + #endif diff --git a/Package@swift-4.swift b/Package@swift-4.swift new file mode 100644 index 0000000..9aca3e4 --- /dev/null +++ b/Package@swift-4.swift @@ -0,0 +1,50 @@ +// swift-tools-version:4.0 +// The swift-tools-version declares the minimum version of Swift required to build this package. +// +// BlueSocket.swift +// BlueSocket +// +// Copyright © 2017 IBM. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +import PackageDescription + +#if os(Linux) || os(macOS) || os(iOS) || os(tvOS) || os(watchOS) +let package = Package( + name: "Socket", + products: [ + // Products define the executables and libraries produced by a package, and make them visible to other packages. + .library( + name: "Socket", + targets: ["Socket"]), + ], + dependencies: [ + // Dependencies declare other packages that this package depends on. + // .package(url: /* package url */, from: "1.0.0"), + ], + targets: [ + // Targets are the basic building blocks of a package. A target defines a module or a test suite. + // Targets can depend on other targets in this package, and on products in packages which this package depends on. + .target( + name: "Socket", + dependencies: []), + .testTarget( + name: "SocketTests", + dependencies: ["Socket"]), + ] +) +#else +fatalError("Unsupported OS") +#endif From a8a5fa768cce047c1f3ce15f4cdf0fb38ea97e8c Mon Sep 17 00:00:00 2001 From: Quan Vo Date: Wed, 30 Aug 2017 13:58:42 -0500 Subject: [PATCH 3/7] Keep Swift version 3.1.1 --- .swift-version | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.swift-version b/.swift-version index b7d9796..94ff29c 100644 --- a/.swift-version +++ b/.swift-version @@ -1 +1 @@ -4.0-DEVELOPMENT-SNAPSHOT-2017-08-21-a +3.1.1 From 0b335ed3415745e9bfaab3930f21db356aaf302f Mon Sep 17 00:00:00 2001 From: Quan Vo Date: Wed, 30 Aug 2017 15:04:36 -0500 Subject: [PATCH 4/7] Linux fixes --- Tests/LinuxMain.swift | 19 +++++++----- Tests/SocketTests/VerifyLinuxTestCount.swift | 32 +++++++++----------- 2 files changed, 27 insertions(+), 24 deletions(-) diff --git a/Tests/LinuxMain.swift b/Tests/LinuxMain.swift index bf4de96..cee895f 100644 --- a/Tests/LinuxMain.swift +++ b/Tests/LinuxMain.swift @@ -19,16 +19,17 @@ import XCTest import Glibc @testable import SocketTests +#if !swift(>=4) // http://stackoverflow.com/questions/24026510/how-do-i-shuffle-an-array-in-swift extension MutableCollection where Indices.Iterator.Element == Index { - + mutating func shuffle() { let c = count guard c > 1 else { return } - + srand(UInt32(time(nil))) for (firstUnshuffled, unshuffledCount) in zip(indices, stride(from: c, to: 1, by: -1)) { - + let d: IndexDistance = numericCast(random() % numericCast(unshuffledCount)) guard d != 0 else { continue } let i = index(firstUnshuffled, offsetBy: d) @@ -38,9 +39,9 @@ extension MutableCollection where Indices.Iterator.Element == Index { } extension Sequence { - + func shuffled() -> [Iterator.Element] { - + var result = Array(self) result.shuffle() return result @@ -48,6 +49,10 @@ extension Sequence { } XCTMain([ - - testCase(SocketTests.allTests.shuffled()), + testCase(SocketTests.allTests.shuffled()) ]) +#else +XCTMain([ + testCase(SocketTests.allTests) + ]) +#endif diff --git a/Tests/SocketTests/VerifyLinuxTestCount.swift b/Tests/SocketTests/VerifyLinuxTestCount.swift index e25c1e7..28553e5 100644 --- a/Tests/SocketTests/VerifyLinuxTestCount.swift +++ b/Tests/SocketTests/VerifyLinuxTestCount.swift @@ -14,20 +14,18 @@ * limitations under the License. **/ -// Does not work on Swift 4.0 -//#if os(macOS) -// import XCTest -// -// class VerifyLinuxTestCount: XCTestCase { -// -// func testVerifyLinuxTestCount() { -// var linuxCount: Int -// var darwinCount: Int -// -// // SocketTests -// linuxCount = SocketTests.allTests.count -// darwinCount = Int(SocketTests.defaultTestSuite.testCaseCount) -// XCTAssertEqual(linuxCount, darwinCount, "\(darwinCount - linuxCount) tests are missing from SocketTests.allTests") -// } -// } -//#endif + +#if os(macOS) && !swift(>=4) + import XCTest + + class VerifyLinuxTestCount: XCTestCase { + func testVerifyLinuxTestCount() { + var linuxCount: Int + var darwinCount: Int + + linuxCount = SocketTests.allTests.count + darwinCount = Int(SocketTests.defaultTestSuite().testCaseCount) + XCTAssertEqual(linuxCount, darwinCount, "\(darwinCount - linuxCount) tests are missing from SocketTests.allTests") + } + } +#endif From e70aff9e530a7eed422346e979cb91e687b3fb45 Mon Sep 17 00:00:00 2001 From: Quan Vo Date: Thu, 31 Aug 2017 09:22:22 -0500 Subject: [PATCH 5/7] Fix array shuffle on Linux Swift 4 --- Tests/LinuxMain.swift | 50 +++++++++++++++++++++++++++---------------- 1 file changed, 31 insertions(+), 19 deletions(-) diff --git a/Tests/LinuxMain.swift b/Tests/LinuxMain.swift index cee895f..2f02f20 100644 --- a/Tests/LinuxMain.swift +++ b/Tests/LinuxMain.swift @@ -19,29 +19,46 @@ import XCTest import Glibc @testable import SocketTests -#if !swift(>=4) // http://stackoverflow.com/questions/24026510/how-do-i-shuffle-an-array-in-swift -extension MutableCollection where Indices.Iterator.Element == Index { - mutating func shuffle() { - let c = count - guard c > 1 else { return } +#if swift(>=4) - srand(UInt32(time(nil))) - for (firstUnshuffled, unshuffledCount) in zip(indices, stride(from: c, to: 1, by: -1)) { + extension MutableCollection { + mutating func shuffle() { + let c = count + guard c > 1 else { return } - let d: IndexDistance = numericCast(random() % numericCast(unshuffledCount)) - guard d != 0 else { continue } - let i = index(firstUnshuffled, offsetBy: d) - swap(&self[firstUnshuffled], &self[i]) + srand(UInt32(time(nil))) + for (firstUnshuffled, unshuffledCount) in zip(indices, stride(from: c, to: 1, by: -1)) { + let d: IndexDistance = numericCast(random() % numericCast(unshuffledCount)) + guard d != 0 else { continue } + let i = index(firstUnshuffled, offsetBy: d) + swapAt(firstUnshuffled, i) + } } } -} + +#else + + extension MutableCollection where Indices.Iterator.Element == Index { + mutating func shuffle() { + let c = count + guard c > 1 else { return } + + srand(UInt32(time(nil))) + for (firstUnshuffled, unshuffledCount) in zip(indices, stride(from: c, to: 1, by: -1)) { + let d: IndexDistance = numericCast(random() % numericCast(unshuffledCount)) + guard d != 0 else { continue } + let i = index(firstUnshuffled, offsetBy: d) + swap(&self[firstUnshuffled], &self[i]) + } + } + } + +#endif extension Sequence { - func shuffled() -> [Iterator.Element] { - var result = Array(self) result.shuffle() return result @@ -51,8 +68,3 @@ extension Sequence { XCTMain([ testCase(SocketTests.allTests.shuffled()) ]) -#else -XCTMain([ - testCase(SocketTests.allTests) - ]) -#endif From feb412914e61510c8034ed2a2d70561d3571ff6f Mon Sep 17 00:00:00 2001 From: Quan Vo Date: Tue, 5 Sep 2017 09:28:18 -0500 Subject: [PATCH 6/7] Add excludes in Swift 4 package manifest --- Package@swift-4.swift | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Package@swift-4.swift b/Package@swift-4.swift index 9aca3e4..d1d0a36 100644 --- a/Package@swift-4.swift +++ b/Package@swift-4.swift @@ -39,7 +39,8 @@ let package = Package( // Targets can depend on other targets in this package, and on products in packages which this package depends on. .target( name: "Socket", - dependencies: []), + dependencies: [], + exclude: ["BlueSocket.xcodeproj", "BlueSocket.xcworkspace", "README.md", "Sources/Info.plist", "Sources/Socket.h"]), .testTarget( name: "SocketTests", dependencies: ["Socket"]), From 885c9c2a2a0acf981bd7194c475bc28c50fb9e91 Mon Sep 17 00:00:00 2001 From: Quan Vo Date: Thu, 7 Sep 2017 15:57:25 -0500 Subject: [PATCH 7/7] Fix BlueSocket.xcodeproj --- .gitignore | 3 +- BlueSocket.xcodeproj/project.pbxproj | 46 +++++++++----------- Tests/SocketTests/VerifyLinuxTestCount.swift | 2 +- 3 files changed, 23 insertions(+), 28 deletions(-) diff --git a/.gitignore b/.gitignore index 67b2e6e..be84e51 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ .build -.DS_Store \ No newline at end of file +.DS_Store +xcuserdata/ diff --git a/BlueSocket.xcodeproj/project.pbxproj b/BlueSocket.xcodeproj/project.pbxproj index 1724f83..e9fca2c 100644 --- a/BlueSocket.xcodeproj/project.pbxproj +++ b/BlueSocket.xcodeproj/project.pbxproj @@ -7,16 +7,13 @@ objects = { /* Begin PBXBuildFile section */ - 8C0F4BFA1C4E84CC008B2B0A /* Socket.h in Headers */ = {isa = PBXBuildFile; fileRef = 8C0F4BF91C4E84CC008B2B0A /* Socket.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 8C0F4C051C4E8630008B2B0A /* SocketProtocols.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8C0F4C021C4E8630008B2B0A /* SocketProtocols.swift */; }; - 8C0F4C061C4E8630008B2B0A /* Socket.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8C0F4C031C4E8630008B2B0A /* Socket.swift */; }; - 8C0F4C071C4E8630008B2B0A /* SocketUtils.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8C0F4C041C4E8630008B2B0A /* SocketUtils.swift */; }; + 595218011F61E34E001A94A2 /* SocketUtils.swift in Sources */ = {isa = PBXBuildFile; fileRef = 595217FC1F61E34E001A94A2 /* SocketUtils.swift */; }; + 595218041F61E34E001A94A2 /* Socket.swift in Sources */ = {isa = PBXBuildFile; fileRef = 595217FF1F61E34E001A94A2 /* Socket.swift */; }; + 595218051F61E34E001A94A2 /* SocketProtocols.swift in Sources */ = {isa = PBXBuildFile; fileRef = 595218001F61E34E001A94A2 /* SocketProtocols.swift */; }; + 5952180B1F61E84E001A94A2 /* Socket.h in Headers */ = {isa = PBXBuildFile; fileRef = 595218091F61E84E001A94A2 /* Socket.h */; settings = {ATTRIBUTES = (Public, ); }; }; 8C51FD591E7C8C8A00C2FDA6 /* BlueSocket.podspec in Resources */ = {isa = PBXBuildFile; fileRef = 8C51FD581E7C8C8A00C2FDA6 /* BlueSocket.podspec */; }; 8C5605D21D50D60400958292 /* Socket.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8C0F4BF61C4E84CC008B2B0A /* Socket.framework */; }; 8C8540B21E9FC1DE00E41C1D /* VerifyLinuxTestCount.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8C8540B01E9FC14E00E41C1D /* VerifyLinuxTestCount.swift */; }; - 8CC36DF81C4EA1BE00BAA659 /* SocketProtocols.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8C0F4C021C4E8630008B2B0A /* SocketProtocols.swift */; }; - 8CC36DF91C4EA1BE00BAA659 /* Socket.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8C0F4C031C4E8630008B2B0A /* Socket.swift */; }; - 8CC36DFA1C4EA1BE00BAA659 /* SocketUtils.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8C0F4C041C4E8630008B2B0A /* SocketUtils.swift */; }; 8CC7217B1D4BCB1D00F5FD19 /* LICENSE in Resources */ = {isa = PBXBuildFile; fileRef = 8CC7217A1D4BCB1D00F5FD19 /* LICENSE */; }; 8CF04E291D4FCE4A00C27814 /* SocketTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8CC721761D4BCA9400F5FD19 /* SocketTests.swift */; }; /* End PBXBuildFile section */ @@ -32,12 +29,12 @@ /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ + 595217FC1F61E34E001A94A2 /* SocketUtils.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = SocketUtils.swift; path = Socket/SocketUtils.swift; sourceTree = ""; }; + 595217FF1F61E34E001A94A2 /* Socket.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = Socket.swift; path = Socket/Socket.swift; sourceTree = ""; }; + 595218001F61E34E001A94A2 /* SocketProtocols.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = SocketProtocols.swift; path = Socket/SocketProtocols.swift; sourceTree = ""; }; + 595218091F61E84E001A94A2 /* Socket.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Socket.h; path = Socket/Socket.h; sourceTree = ""; }; + 5952180C1F61E8A2001A94A2 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = Socket/Info.plist; sourceTree = ""; }; 8C0F4BF61C4E84CC008B2B0A /* Socket.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Socket.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 8C0F4BF91C4E84CC008B2B0A /* Socket.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Socket.h; sourceTree = ""; }; - 8C0F4BFB1C4E84CC008B2B0A /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 8C0F4C021C4E8630008B2B0A /* SocketProtocols.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SocketProtocols.swift; sourceTree = ""; }; - 8C0F4C031C4E8630008B2B0A /* Socket.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Socket.swift; sourceTree = ""; }; - 8C0F4C041C4E8630008B2B0A /* SocketUtils.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SocketUtils.swift; sourceTree = ""; }; 8C0F4C081C4E866E008B2B0A /* Package.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Package.swift; sourceTree = ""; }; 8C51FD581E7C8C8A00C2FDA6 /* BlueSocket.podspec */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = BlueSocket.podspec; sourceTree = ""; }; 8C8540B01E9FC14E00E41C1D /* VerifyLinuxTestCount.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = VerifyLinuxTestCount.swift; path = Tests/SocketTests/VerifyLinuxTestCount.swift; sourceTree = ""; }; @@ -103,9 +100,9 @@ 8C0F4BF81C4E84CC008B2B0A /* Sources */ = { isa = PBXGroup; children = ( - 8C0F4C031C4E8630008B2B0A /* Socket.swift */, - 8C0F4C021C4E8630008B2B0A /* SocketProtocols.swift */, - 8C0F4C041C4E8630008B2B0A /* SocketUtils.swift */, + 595217FF1F61E34E001A94A2 /* Socket.swift */, + 595218001F61E34E001A94A2 /* SocketProtocols.swift */, + 595217FC1F61E34E001A94A2 /* SocketUtils.swift */, 8C0F4C011C4E85F7008B2B0A /* Supporting Files */, ); path = Sources; @@ -114,8 +111,8 @@ 8C0F4C011C4E85F7008B2B0A /* Supporting Files */ = { isa = PBXGroup; children = ( - 8C0F4BF91C4E84CC008B2B0A /* Socket.h */, - 8C0F4BFB1C4E84CC008B2B0A /* Info.plist */, + 595218091F61E84E001A94A2 /* Socket.h */, + 5952180C1F61E8A2001A94A2 /* Info.plist */, ); name = "Supporting Files"; sourceTree = ""; @@ -146,7 +143,7 @@ isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - 8C0F4BFA1C4E84CC008B2B0A /* Socket.h in Headers */, + 5952180B1F61E84E001A94A2 /* Socket.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -287,9 +284,9 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 8C0F4C051C4E8630008B2B0A /* SocketProtocols.swift in Sources */, - 8C0F4C061C4E8630008B2B0A /* Socket.swift in Sources */, - 8C0F4C071C4E8630008B2B0A /* SocketUtils.swift in Sources */, + 595218041F61E34E001A94A2 /* Socket.swift in Sources */, + 595218011F61E34E001A94A2 /* SocketUtils.swift in Sources */, + 595218051F61E34E001A94A2 /* SocketProtocols.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -306,9 +303,6 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 8CC36DF81C4EA1BE00BAA659 /* SocketProtocols.swift in Sources */, - 8CC36DF91C4EA1BE00BAA659 /* Socket.swift in Sources */, - 8CC36DFA1C4EA1BE00BAA659 /* SocketUtils.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -440,7 +434,7 @@ DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; FRAMEWORK_VERSION = A; - INFOPLIST_FILE = "$(SRCROOT)/Sources/Info.plist"; + INFOPLIST_FILE = "$(SRCROOT)/Sources/Socket/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 10.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks"; @@ -462,7 +456,7 @@ DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; FRAMEWORK_VERSION = A; - INFOPLIST_FILE = "$(SRCROOT)/Sources/Info.plist"; + INFOPLIST_FILE = "$(SRCROOT)/Sources/Socket/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 10.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks"; diff --git a/Tests/SocketTests/VerifyLinuxTestCount.swift b/Tests/SocketTests/VerifyLinuxTestCount.swift index 28553e5..23c5c42 100644 --- a/Tests/SocketTests/VerifyLinuxTestCount.swift +++ b/Tests/SocketTests/VerifyLinuxTestCount.swift @@ -15,7 +15,7 @@ **/ -#if os(macOS) && !swift(>=4) +#if os(macOS) && !swift(>=3.2) import XCTest class VerifyLinuxTestCount: XCTestCase {