Skip to content
This repository has been archived by the owner on May 13, 2024. It is now read-only.

Add required to designated initializers #130

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
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
4 changes: 2 additions & 2 deletions Source/WebSocket.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1668,7 +1668,7 @@ open class WebSocket: NSObject {
self.init(request: URLRequest(url: URL(string: url)!), subProtocols: [subProtocol])
}
/// Create a WebSocket connection from an NSURLRequest; Also include a list of protocols.
public init(request: URLRequest, subProtocols : [String] = []){
public required init(request: URLRequest, subProtocols : [String] = []){
let hasURL = request.url != nil
opened = hasURL
ws = InnerWebSocket(request: request, subProtocols: subProtocols, stub: !hasURL)
Expand All @@ -1683,7 +1683,7 @@ open class WebSocket: NSObject {
}
}
/// Create a WebSocket object with a deferred connection; the connection is not opened until the .open() method is called.
public convenience override init(){
public required convenience override init(){
var request = URLRequest(url: URL(string: "http://apple.com")!)
request.url = nil
self.init(request: request, subProtocols: [])
Expand Down
4 changes: 2 additions & 2 deletions SwiftWebSocket.podspec
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
Pod::Spec.new do |s|
s.name = "SwiftWebSocket"
s.version = "2.7.0"
s.version = "2.7.1"
s.summary = "A high performance WebSocket client library for Swift."
s.homepage = "https://github.com/tidwall/SwiftWebSocket"
s.license = { :type => "Attribution License", :file => "LICENSE" }
s.source = { :git => "https://github.com/tidwall/SwiftWebSocket.git", :tag => "v2.7.0" }
s.source = { :git => "https://github.com/tidwall/SwiftWebSocket.git", :tag => "v2.7.1" }
s.authors = { 'Josh Baker' => '[email protected]' }
s.social_media_url = "https://twitter.com/tidwall"
s.ios.deployment_target = "8.0"
Expand Down