Compare commits

...

16 Commits

Author SHA1 Message Date
Kristaps Grinbergs 9c03ef715d Merge pull request #636 from daltoniam/swift_5
Swift 5 support
2019-03-26 11:11:18 +07:00
Kristaps Grinbergs 7860785cf3 Added version for Swift 4.2 2019-03-26 11:10:59 +07:00
Kristaps Grinbergs b1312f8af1 Fix warnings about project file 2019-03-26 11:04:18 +07:00
Kristaps Grinbergs 514eb3ddb9 Merge pull request #628 from yamoridon/ws-server-frozen-string
Fix FrozenError in ws-server.rb
2019-03-01 08:33:43 +07:00
Kazuki Ohara 4c48638295 Fix FrozenError in ws-server.rb 2019-03-01 00:28:36 +09:00
Kristaps Grinbergs 429bd1a0b7 Swift 5 support 2019-02-22 16:09:03 +02:00
Kristaps Grinbergs 5ecb5fd499 Merge pull request #618 from c0diq/fix-archs-2
Better way to fix archs
2019-02-11 10:16:25 +02:00
Sylvain Rebaud fbd80c2367 Better way to fix archs 2019-02-09 03:10:52 -08:00
Kristaps Grinbergs 40cda44e40 Merge pull request #616 from c0diq/fix-archs
Fix Xcode 10.1 valid archs warnings
2019-02-06 17:55:17 +02:00
Sylvain Rebaud 51ee77cf6c Fix Xcode 10.1 valid archs warnings 2019-02-05 21:36:45 -08:00
Kristaps Grinbergs de293c4b26 Merge pull request #614 from c0diq/fix-code-signing
Fix code signing
2019-02-02 20:19:17 +02:00
Sylvain Rebaud 688bd32df8 Fix Tests 2019-01-25 14:20:41 -08:00
Sylvain Rebaud ee00c1dfdd Fix incorrect code signing
There’s no need to define code signing for frameworks. If hardcoding iOS Developer, this would prevent a framework from getting signed for Enterprise.
2019-01-25 14:20:41 -08:00
Kristaps Grinbergs 07e09a8ab3 Merge pull request #603 from turingvideo/master
Static queue can cause unexpected timeout when there are multiple ws connections.
2019-01-17 18:32:05 +02:00
Sen Liu d58f0a4436 fix 2018-12-21 10:59:36 -08:00
Sen Liu 36254e8945 fix static queue issues 2018-12-14 16:34:15 -08:00
7 changed files with 41 additions and 66 deletions
+11 -7
View File
@@ -2,6 +2,10 @@
All notable changes to this project will be documented in this file.
`Starscream` adheres to [Semantic Versioning](http://semver.org/).
### [3.1.0](https://github.com/daltoniam/Starscream/tree/3.1.0)
* Swift 5.0 and Xcode 10.2 support
#### [3.0.6](https://github.com/daltoniam/Starscream/tree/3.0.6)
* Swift 4.2 and Xcode 10 support
@@ -149,14 +153,14 @@ Warning fixes for Swift 3.1
Fix for the Swift Package Manager.
Fixed:
Fixed:
[#277](https://github.com/daltoniam/Starscream/issues/277)
#### [2.0.1](https://github.com/daltoniam/Starscream/tree/2.0.1)
Bug fixes.
Fixed:
Fixed:
[#261](https://github.com/daltoniam/Starscream/issues/261)
[#276](https://github.com/daltoniam/Starscream/issues/276)
[#267](https://github.com/daltoniam/Starscream/issues/267)
@@ -167,7 +171,7 @@ Fixed:
Added Swift 3 support.
Fixed:
Fixed:
[#229](https://github.com/daltoniam/Starscream/issues/229)
[#232](https://github.com/daltoniam/Starscream/issues/232)
@@ -177,7 +181,7 @@ Swift 2.3 support.
#### [1.1.3](https://github.com/daltoniam/Starscream/tree/1.1.3)
Changed:
Changed:
[#170](https://github.com/daltoniam/Starscream/issues/170)
[#171](https://github.com/daltoniam/Starscream/issues/171)
[#174](https://github.com/daltoniam/Starscream/issues/174)
@@ -186,14 +190,14 @@ Changed:
#### [1.1.2](https://github.com/daltoniam/Starscream/tree/1.1.2)
Fixed:
Fixed:
[#158](https://github.com/daltoniam/Starscream/issues/158)
[#161](https://github.com/daltoniam/Starscream/issues/161)
[#164](https://github.com/daltoniam/Starscream/issues/164)
#### [1.1.1](https://github.com/daltoniam/Starscream/tree/1.1.1)
Fixed:
Fixed:
[#157](https://github.com/daltoniam/Starscream/issues/157)
#### [1.1.0](https://github.com/daltoniam/Starscream/tree/1.1.0)
@@ -201,7 +205,7 @@ Fixed:
Changed:
Moved over to Runloop/default GCD queues to shared queue.
Fixed:
Fixed:
[#153](https://github.com/daltoniam/Starscream/issues/153)
[#151](https://github.com/daltoniam/Starscream/issues/151)
[#150](https://github.com/daltoniam/Starscream/issues/150)
+4
View File
@@ -385,6 +385,10 @@ func websocketHttpUpgrade(socket: WebSocketClient, response: CFHTTPMessage) {
}
```
## Swift versions
* Swift 4.2 - 3.0.6
## KNOWN ISSUES
- WatchOS does not have the the CFNetwork String constants to modify the stream's SSL behavior. It will be the default Foundation SSL behavior. This means watchOS CANNOT use `SSLCiphers`, `disableSSLCertValidation`, or SSL pinning. All these values set on watchOS will do nothing.
- Linux does not have the security framework, so it CANNOT use SSL pinning or `SSLCiphers` either.
+4 -4
View File
@@ -135,7 +135,7 @@ public protocol WSStream {
}
open class FoundationStream : NSObject, WSStream, StreamDelegate {
private static let sharedWorkQueue = DispatchQueue(label: "com.vluxe.starscream.websocket", attributes: [])
private let workQueue = DispatchQueue(label: "com.vluxe.starscream.websocket", attributes: [])
private var inputStream: InputStream?
private var outputStream: OutputStream?
public weak var delegate: WSStreamDelegate?
@@ -210,13 +210,13 @@ open class FoundationStream : NSObject, WSStream, StreamDelegate {
#endif
}
CFReadStreamSetDispatchQueue(inStream, FoundationStream.sharedWorkQueue)
CFWriteStreamSetDispatchQueue(outStream, FoundationStream.sharedWorkQueue)
CFReadStreamSetDispatchQueue(inStream, workQueue)
CFWriteStreamSetDispatchQueue(outStream, workQueue)
inStream.open()
outStream.open()
var out = timeout// wait X seconds before giving up
FoundationStream.sharedWorkQueue.async { [weak self] in
workQueue.async { [weak self] in
while !outStream.hasSpaceAvailable {
usleep(100) // wait until the socket is ready
out -= 100
+2 -2
View File
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "Starscream"
s.version = "3.0.6"
s.version = "3.1.0"
s.summary = "A conforming WebSocket RFC 6455 client library in Swift."
s.homepage = "https://github.com/daltoniam/Starscream"
s.license = 'Apache License, Version 2.0'
@@ -12,5 +12,5 @@ Pod::Spec.new do |s|
s.tvos.deployment_target = '9.0'
s.watchos.deployment_target = '2.0'
s.source_files = 'Sources/**/*.swift'
s.swift_version = '4.2'
s.swift_version = '5.0'
end
+16 -47
View File
@@ -12,14 +12,11 @@
335FA1FC1F5DF71D00F6D2EC /* libz.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = D88EAF811ED4DFD3004FE2C3 /* libz.tbd */; };
33CCF08A1F5DDC030099B092 /* libz.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = D88EAF811ED4DFD3004FE2C3 /* libz.tbd */; };
33CCF08C1F5DDC030099B092 /* Starscream.h in Headers */ = {isa = PBXBuildFile; fileRef = 5C1360001C473BEF00AA3A01 /* Starscream.h */; settings = {ATTRIBUTES = (Public, ); }; };
48F1584221FBC1200093F06A /* Starscream.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 33CCF0921F5DDC030099B092 /* Starscream.framework */; };
BBB5ABE5215E2217005B48B6 /* Compression.swift in Sources */ = {isa = PBXBuildFile; fileRef = BBB5ABE1215E2217005B48B6 /* Compression.swift */; };
BBB5ABE6215E2217005B48B6 /* SSLClientCertificate.swift in Sources */ = {isa = PBXBuildFile; fileRef = BBB5ABE2215E2217005B48B6 /* SSLClientCertificate.swift */; };
BBB5ABE7215E2217005B48B6 /* SSLSecurity.swift in Sources */ = {isa = PBXBuildFile; fileRef = BBB5ABE3215E2217005B48B6 /* SSLSecurity.swift */; };
BBB5ABE8215E2217005B48B6 /* WebSocket.swift in Sources */ = {isa = PBXBuildFile; fileRef = BBB5ABE4215E2217005B48B6 /* WebSocket.swift */; };
BBB5ABE9215E221D005B48B6 /* Compression.swift in Sources */ = {isa = PBXBuildFile; fileRef = BBB5ABE1215E2217005B48B6 /* Compression.swift */; };
BBB5ABEA215E221D005B48B6 /* SSLClientCertificate.swift in Sources */ = {isa = PBXBuildFile; fileRef = BBB5ABE2215E2217005B48B6 /* SSLClientCertificate.swift */; };
BBB5ABEB215E221D005B48B6 /* SSLSecurity.swift in Sources */ = {isa = PBXBuildFile; fileRef = BBB5ABE3215E2217005B48B6 /* SSLSecurity.swift */; };
BBB5ABEC215E221D005B48B6 /* WebSocket.swift in Sources */ = {isa = PBXBuildFile; fileRef = BBB5ABE4215E2217005B48B6 /* WebSocket.swift */; };
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
@@ -42,6 +39,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
48F1584221FBC1200093F06A /* Starscream.framework in Frameworks */,
335FA1FC1F5DF71D00F6D2EC /* libz.tbd in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
@@ -172,7 +170,7 @@
attributes = {
LastSwiftMigration = 0700;
LastSwiftUpdateCheck = 0700;
LastUpgradeCheck = 0900;
LastUpgradeCheck = 1020;
ORGANIZATIONNAME = Vluxe;
TargetAttributes = {
335FA1F41F5DF71D00F6D2EC = {
@@ -188,6 +186,7 @@
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
English,
en,
);
mainGroup = 6B3E79DC19D48B7F006071F7;
@@ -223,12 +222,8 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
BBB5ABEB215E221D005B48B6 /* SSLSecurity.swift in Sources */,
BBB5ABEC215E221D005B48B6 /* WebSocket.swift in Sources */,
BBB5ABE9215E221D005B48B6 /* Compression.swift in Sources */,
335FA1F91F5DF71D00F6D2EC /* CompressionTests.swift in Sources */,
335FA1FA1F5DF71D00F6D2EC /* StarscreamTests.swift in Sources */,
BBB5ABEA215E221D005B48B6 /* SSLClientCertificate.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -251,11 +246,6 @@
buildSettings = {
APPLICATION_EXTENSION_API_ONLY = NO;
CLANG_ENABLE_MODULES = YES;
DEVELOPMENT_TEAM = "";
FRAMEWORK_SEARCH_PATHS = (
"$(SDKROOT)/Developer/Library/Frameworks",
"$(inherited)",
);
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
@@ -265,12 +255,11 @@
"LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks @executable_path/../Frameworks @loader_path/../Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "com.vluxe.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = "";
SUPPORTED_PLATFORMS = "iphonesimulator iphoneos appletvos appletvsimulator macosx";
SWIFT_INSTALL_OBJC_HEADER = NO;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 5.0;
};
name = Debug;
};
@@ -279,22 +268,16 @@
buildSettings = {
APPLICATION_EXTENSION_API_ONLY = NO;
CLANG_ENABLE_MODULES = YES;
DEVELOPMENT_TEAM = "";
FRAMEWORK_SEARCH_PATHS = (
"$(SDKROOT)/Developer/Library/Frameworks",
"$(inherited)",
);
INFOPLIST_FILE = "$(SRCROOT)/Tests/Info.plist";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
"LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks @executable_path/../Frameworks @loader_path/../Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "com.vluxe.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = "";
SUPPORTED_PLATFORMS = "iphonesimulator iphoneos appletvos appletvsimulator macosx";
SWIFT_INSTALL_OBJC_HEADER = NO;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 5.0;
};
name = Release;
};
@@ -303,10 +286,7 @@
buildSettings = {
BITCODE_GENERATION_MODE = marker;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_IDENTITY = "Mac Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = "";
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
@@ -318,15 +298,11 @@
OTHER_LDFLAGS = "-all_load";
PRODUCT_BUNDLE_IDENTIFIER = "com.vluxe.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE = "";
SDKROOT = "";
SKIP_INSTALL = YES;
SUPPORTED_PLATFORMS = "iphonesimulator iphoneos macosx appletvsimulator appletvos watchos watchsimulator";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 5.0;
TVOS_DEPLOYMENT_TARGET = 9.0;
VALID_ARCHS = "x86_64 i386 arm64 armv7s armv7 armv7k";
WATCHOS_DEPLOYMENT_TARGET = 2.0;
};
name = Debug;
@@ -336,10 +312,7 @@
buildSettings = {
BITCODE_GENERATION_MODE = bitcode;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = "";
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
@@ -351,15 +324,11 @@
OTHER_LDFLAGS = "-all_load";
PRODUCT_BUNDLE_IDENTIFIER = "com.vluxe.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE = "";
SDKROOT = "";
SKIP_INSTALL = YES;
SUPPORTED_PLATFORMS = "iphonesimulator iphoneos macosx appletvsimulator appletvos watchos watchsimulator";
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 5.0;
TVOS_DEPLOYMENT_TARGET = 9.0;
VALID_ARCHS = "x86_64 i386 arm64 armv7s armv7 armv7k";
WATCHOS_DEPLOYMENT_TARGET = 2.0;
};
name = Release;
@@ -369,6 +338,7 @@
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
APPLICATION_EXTENSION_API_ONLY = YES;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
@@ -377,12 +347,14 @@
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
@@ -390,7 +362,6 @@
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 1;
ENABLE_STRICT_OBJC_MSGSEND = YES;
@@ -413,12 +384,10 @@
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = "";
SUPPORTED_PLATFORMS = "iphonesimulator iphoneos macosx appletvos appletvsimulator watchsimulator watchos";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2,3,4";
VALID_ARCHS = "x86_64 i386";
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
};
@@ -429,6 +398,7 @@
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
APPLICATION_EXTENSION_API_ONLY = YES;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
@@ -437,12 +407,14 @@
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
@@ -450,7 +422,6 @@
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = YES;
CURRENT_PROJECT_VERSION = 1;
ENABLE_NS_ASSERTIONS = NO;
@@ -465,12 +436,10 @@
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = "";
SUPPORTED_PLATFORMS = "iphonesimulator iphoneos macosx appletvos appletvsimulator watchsimulator watchos";
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2,3,4";
VALIDATE_PRODUCT = YES;
VALID_ARCHS = "x86_64 i386";
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
};
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0900"
LastUpgradeVersion = "1020"
version = "1.7">
<BuildAction
parallelizeBuildables = "YES"
@@ -26,9 +26,8 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
shouldUseLaunchSchemeArgsEnv = "YES"
codeCoverageEnabled = "YES">
codeCoverageEnabled = "YES"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
<TestableReference
skipped = "NO">
@@ -61,7 +60,6 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
+1 -1
View File
@@ -19,7 +19,7 @@ EM.run {
ws.onmessage { |msg|
puts "message from client: #{msg}"
ws.send Faker::Hacker.say_something_smart
ws.send +Faker::Hacker.say_something_smart
}
end
}