Skip to content

Commit 6061152

Browse files
committed
add deprecated initializer to RealtimeClient for compatibility
1 parent d030b15 commit 6061152

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

Sources/Realtime/RealtimeClient.swift

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,21 @@ public class RealtimeClient: TransportDelegate {
192192
vsn: vsn
193193
)
194194
}
195+
196+
@available(*, deprecated, renamed: "init(_:paramsClosure:vsn:)")
197+
public convenience init(
198+
endPoint: String,
199+
paramsClosure: PayloadClosure?,
200+
vsn: String = Defaults.vsn
201+
) {
202+
self.init(
203+
endPoint: endPoint,
204+
transport: { url in URLSessionTransport(url: url) },
205+
paramsClosure: paramsClosure,
206+
vsn: vsn
207+
)
208+
}
209+
195210

196211
public init(
197212
endPoint: String,

0 commit comments

Comments
 (0)