Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
368742c
[Enhancement] Wire StreamCore into the StreamVideo target
Jul 1, 2026
efb1894
[StreamCore]Migrate SDK signaling & core infra onto stream-core-swift…
Jul 2, 2026
6d9163f
Fix websocket interval
Jul 13, 2026
640a656
Remove duplicated reconnection policies
Jul 13, 2026
b651fc1
Address feedback
Jul 13, 2026
ae23567
fix e2e tests
Jul 13, 2026
b6c5f91
Fix StreamCore imports for library evolution
Jul 13, 2026
4bebc4f
Fix StreamCore enum resilience
Jul 14, 2026
1b6386f
[Enhancement] Restore WebRTC log level synchronization (#1194)
ipavlidakis Jul 14, 2026
5f24a32
[Enhancement]Remove unused background task scheduler (#1193)
ipavlidakis Jul 14, 2026
54a1687
[StreamCore]Migrate to using RawJSON, JsonDecoder and ReflectiveStrin…
ipavlidakis Jul 15, 2026
3291ac0
[StreamCore]Migrate DisposableBag (#1196)
ipavlidakis Jul 15, 2026
d6ad915
[StreamCore] Migrate shared runtime primitives to StreamCore (#1197)
ipavlidakis Jul 16, 2026
1a44ddf
[StreamCore]Use StreamCore WebSocket state for coordinator connection…
ipavlidakis Jul 17, 2026
9a5ef66
[StreamCore] Preserve SFU reconnect close codes (#1202)
ipavlidakis Jul 20, 2026
fffe5f6
[StreamCore]Manual import StreamCore in generated models (#1203)
ipavlidakis Jul 20, 2026
940e94e
[StreamCore] Use core WebSocket state for SFU (#1204)
ipavlidakis Jul 20, 2026
7d887e4
Fix failing test
Jul 20, 2026
99c7b04
[Fix] Import StreamCore Event in SwiftUI
Jul 20, 2026
2f7c929
[Hygiene] Disable queue debugging in DemoApp scheme
Jul 20, 2026
60fbc28
[StreamCore] Remove obsolete SFU event wrapper (#1205)
ipavlidakis Jul 21, 2026
3be4960
Adding test to ensure connection recovery flow
ipavlidakis Jul 23, 2026
ae2d232
[StreamCore]Unify APIError (#1208)
ipavlidakis Jul 23, 2026
ecfda6a
Fix sonar analysis failure
ipavlidakis Jul 23, 2026
5ad7433
[Clean up & fixing production code and tests
ipavlidakis Jul 23, 2026
46f5d24
[Migrated]Timer entities
ipavlidakis Jul 23, 2026
764dab3
@_exported StreamCore
ipavlidakis Jul 24, 2026
4bc4583
Remove remaining StreamCore.* prefixed imports
ipavlidakis Jul 24, 2026
0ee0aa9
Fix WebRTCTrace distribution build
ipavlidakis Jul 24, 2026
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
3 changes: 1 addition & 2 deletions DemoApp/Sources/Models/TokenResponse.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@
//

import Foundation
import StreamVideo

struct TokenResponse: Codable, ReflectiveStringConvertible {
struct TokenResponse: Codable {
let userId: String
let token: String
let apiKey: String
Expand Down
17 changes: 13 additions & 4 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -23,26 +23,35 @@ let package = Package(
],
dependencies: [
.package(url: "https://github.com/apple/swift-protobuf.git", exact: "1.30.0"),
.package(url: "https://github.com/GetStream/stream-video-swift-webrtc.git", exact: "145.8.0")
.package(url: "https://github.com/GetStream/stream-video-swift-webrtc.git", exact: "145.8.0"),
.package(url: "https://github.com/GetStream/stream-core-swift.git", branch: "develop")
],
targets: [
.target(
name: "StreamVideo",
dependencies: [
.product(name: "SwiftProtobuf", package: "swift-protobuf"),
.product(name: "StreamWebRTC", package: "stream-video-swift-webrtc")
.product(name: "StreamWebRTC", package: "stream-video-swift-webrtc"),
.product(name: "StreamCore", package: "stream-core-swift")
]
),
.target(
name: "StreamVideoSwiftUI",
dependencies: ["StreamVideo"],
dependencies: [
"StreamVideo",
.product(name: "StreamCore", package: "stream-core-swift")
],
resources: [
.process("Resources")
]
),
.target(
name: "StreamVideoUIKit",
dependencies: ["StreamVideo", "StreamVideoSwiftUI"]
dependencies: [
"StreamVideo",
"StreamVideoSwiftUI",
.product(name: "StreamCore", package: "stream-core-swift")
]
)
]
)
16 changes: 16 additions & 0 deletions Scripts/generate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,21 @@ rm -rf "$PROJECT_ROOT/Sources/StreamVideo/OpenApi/generated/Models/"*
go run . openapi generate-client --language swift --spec "$SOURCE_PATH/releases/v2/video-openapi-clientside.yaml" --output "$PROJECT_ROOT/Sources/StreamVideo/OpenApi/generated/"
)

# Shared OpenAPI types are provided by StreamCore.
rm -f \
"$PROJECT_ROOT/Sources/StreamVideo/OpenApi/generated/APIHelper.swift" \
"$PROJECT_ROOT/Sources/StreamVideo/OpenApi/generated/CodableHelper.swift" \
"$PROJECT_ROOT/Sources/StreamVideo/OpenApi/generated/Extensions.swift" \
"$PROJECT_ROOT/Sources/StreamVideo/OpenApi/generated/JSONDataEncoding.swift" \
"$PROJECT_ROOT/Sources/StreamVideo/OpenApi/generated/Models.swift" \
"$PROJECT_ROOT/Sources/StreamVideo/OpenApi/generated/OpenISO8601DateFormatter.swift" \
"$PROJECT_ROOT/Sources/StreamVideo/OpenApi/generated/Models/APIError.swift" \
"$PROJECT_ROOT/Sources/StreamVideo/OpenApi/generated/Models/ConnectUserDetailsRequest.swift" \
"$PROJECT_ROOT/Sources/StreamVideo/OpenApi/generated/Models/CreateDeviceRequest.swift" \
"$PROJECT_ROOT/Sources/StreamVideo/OpenApi/generated/Models/Device.swift" \
"$PROJECT_ROOT/Sources/StreamVideo/OpenApi/generated/Models/ListDevicesResponse.swift" \
"$PROJECT_ROOT/Sources/StreamVideo/OpenApi/generated/Models/ModelResponse.swift" \
"$PROJECT_ROOT/Sources/StreamVideo/OpenApi/generated/Models/WSAuthMessageRequest.swift"

# format the generated code
swiftformat Sources/StreamVideo/OpenApi/generated
16 changes: 16 additions & 0 deletions Scripts/generateCode.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,22 @@ cp ${OPENAPI_GENERATED_CODE_ROOT}/tmp/OpenAPIClient/Classes/OpenAPIs/*.swift ${O
cp ${OPENAPI_GENERATED_CODE_ROOT}/tmp/OpenAPIClient/Classes/OpenAPIs/APIs/DefaultAPI.swift ${OPENAPI_GENERATED_CODE_ROOT}/APIs/
mv ${OPENAPI_GENERATED_CODE_ROOT}/tmp/OpenAPIClient/Classes/OpenAPIs/Models ${OPENAPI_GENERATED_CODE_ROOT}

# Shared OpenAPI types are provided by StreamCore.
rm -f \
"${OPENAPI_GENERATED_CODE_ROOT}/APIHelper.swift" \
"${OPENAPI_GENERATED_CODE_ROOT}/CodableHelper.swift" \
"${OPENAPI_GENERATED_CODE_ROOT}/Extensions.swift" \
"${OPENAPI_GENERATED_CODE_ROOT}/JSONDataEncoding.swift" \
"${OPENAPI_GENERATED_CODE_ROOT}/Models.swift" \
"${OPENAPI_GENERATED_CODE_ROOT}/OpenISO8601DateFormatter.swift" \
"${OPENAPI_GENERATED_CODE_ROOT}/Models/APIError.swift" \
"${OPENAPI_GENERATED_CODE_ROOT}/Models/ConnectUserDetailsRequest.swift" \
"${OPENAPI_GENERATED_CODE_ROOT}/Models/CreateDeviceRequest.swift" \
"${OPENAPI_GENERATED_CODE_ROOT}/Models/Device.swift" \
"${OPENAPI_GENERATED_CODE_ROOT}/Models/ListDevicesResponse.swift" \
"${OPENAPI_GENERATED_CODE_ROOT}/Models/ModelResponse.swift" \
"${OPENAPI_GENERATED_CODE_ROOT}/Models/WSAuthMessageRequest.swift"

# delete the tmp path
rm -rf "${OPENAPI_GENERATED_CODE_ROOT}/tmp"

Expand Down
1 change: 1 addition & 0 deletions Sources/StreamVideo/Call.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import AVFoundation
import Combine
import Foundation
import StreamCore
import StreamWebRTC

/// Observable object that provides info about the call state, as well as methods for updating it.
Expand Down
1 change: 1 addition & 0 deletions Sources/StreamVideo/CallKit/CallKitService.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import AVFoundation
import CallKit
import Combine
import Foundation
import StreamCore
import StreamWebRTC

/// Manages CallKit integration for VoIP calls.
Expand Down
1 change: 1 addition & 0 deletions Sources/StreamVideo/CallState.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

import Combine
import Foundation
import StreamCore

@MainActor
public class CallState: ObservableObject {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

import Combine
import Foundation
import StreamCore

extension Call.StateMachine {
/// Represents a stage in the call state machine.
Expand Down
46 changes: 0 additions & 46 deletions Sources/StreamVideo/DependencyInjection/InjectedValues.swift

This file was deleted.

121 changes: 4 additions & 117 deletions Sources/StreamVideo/Errors/Errors.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,122 +3,11 @@
//

import Foundation
import StreamCore

extension Stream_Video_Sfu_Models_Error: Error, ReflectiveStringConvertible {}

/// A Client error.
public class ClientError: Error, CustomStringConvertible, @unchecked Sendable {
public struct Location: Equatable, Sendable, CustomStringConvertible {
public let file: String
public let line: Int
public var description: String { "{ file:\(file), line:\(line) }" }
}

/// The file and line number which emitted the error.
public let location: Location?

private let message: String?

/// An underlying error.
public let underlyingError: Error?

public let apiError: APIError?

var errorDescription: String? {
if let apiError {
return apiError.message
} else {
return underlyingError.map(String.init(describing:))
}
}

/// Retrieve the localized description for this error.
public var localizedDescription: String { message ?? errorDescription ?? "" }

public var description: String {
var result = "ClientError {"
result += " location:\(location)"
if let message {
result += " message:\(message)"
}
if let apiError {
result += ", apiError:\(apiError)"
}
if let underlyingError {
result += ", underlyingError:\(underlyingError)"
}
if let errorDescription {
result += ", errorDescription:\(errorDescription)"
}
result += " }"
return result
}

/// A client error based on an external general error.
/// - Parameters:
/// - error: an external error.
/// - file: a file name source of an error.
/// - line: a line source of an error.
public init(with error: Error? = nil, _ file: StaticString = #fileID, _ line: UInt = #line) {
underlyingError = error
message = error?.localizedDescription ?? nil
location = .init(file: "\(file)", line: Int(line))
if let aErr = error as? APIError {
apiError = aErr
} else {
apiError = nil
}
}

/// An error based on a message.
/// - Parameters:
/// - message: an error message.
/// - file: a file name source of an error.
/// - line: a line source of an error.
public init(_ message: String, _ file: StaticString = #fileID, _ line: UInt = #line) {
self.message = message
location = .init(file: "\(file)", line: Int(line))
underlyingError = nil
apiError = nil
}
}

extension ClientError {
/// An unexpected error.
public final class Unexpected: ClientError, @unchecked Sendable {}

/// An unknown error.
public final class Unknown: ClientError, @unchecked Sendable {}

/// Networking error.
public final class NetworkError: ClientError, @unchecked Sendable {}

/// Represents a network-related error indicating that the network is unavailable.
public final class NetworkNotAvailable: ClientError, @unchecked Sendable {}

/// Permissions error.
public final class MissingPermissions: ClientError, @unchecked Sendable {}

/// Invalid url error.
public final class InvalidURL: ClientError, @unchecked Sendable {}
}

// This should probably live only in the test target since it's not "true" equatable
extension ClientError: Equatable {
public static func == (lhs: ClientError, rhs: ClientError) -> Bool {
type(of: lhs) == type(of: rhs)
&& String(describing: lhs.underlyingError) == String(describing: rhs.underlyingError)
&& String(describing: lhs.localizedDescription) == String(describing: rhs.localizedDescription)
}
}

extension ClientError {
/// Returns `true` if underlaying error is `ErrorPayload` with code is inside invalid token codes range.
var isInvalidTokenError: Bool {
(underlyingError as? ErrorPayload)?.isInvalidTokenError == true
|| apiError?.isTokenExpiredError == true
}
}
extension Stream_Video_Sfu_Models_Error:
Error,
ReflectiveStringConvertible {}

extension Error {
var isRateLimitError: Bool {
Expand Down Expand Up @@ -158,5 +47,3 @@ extension ClosedRange where Bound == Int {
struct APIErrorContainer: Codable {
let error: APIError
}

extension APIError: Error {}
1 change: 1 addition & 0 deletions Sources/StreamVideo/HTTPClient/HTTPUtils.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
//

import Foundation
import StreamCore

extension URLRequest {
var queryItems: [URLQueryItem] {
Expand Down
Loading
Loading