-
Notifications
You must be signed in to change notification settings - Fork 35
[Enhancement]Migrate sdk signaling core infra onto stream core swift #1178
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Changes from 21 commits
368742c
efb1894
6d9163f
640a656
b651fc1
ae23567
b6c5f91
4bebc4f
1b6386f
5f24a32
54a1687
3291ac0
d6ad915
1a44ddf
9a5ef66
fffe5f6
940e94e
7d887e4
99c7b04
2f7c929
60fbc28
3be4960
ae2d232
ecfda6a
5ad7433
46f5d24
764dab3
4bc4583
0ee0aa9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| // | ||
| // Copyright Β© 2026 Stream.io Inc. All rights reserved. | ||
| // | ||
|
|
||
| import StreamCore | ||
|
|
||
| extension APIError: ReflectiveStringConvertible {} |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| // | ||
| // Copyright Β© 2026 Stream.io Inc. All rights reserved. | ||
| // | ||
|
|
||
| import Foundation | ||
| import StreamCore | ||
|
|
||
| /// StreamVideo-facing name for StreamCore's `APIError`. | ||
| /// | ||
| /// This is the canonical API error type for hand-written code; the generated | ||
| /// OpenAPI layer keeps its own `APIError`. A distinct alias name is required | ||
| /// because the generated `APIError` already occupies the bare name in this | ||
| /// module, and referencing `StreamCore.APIError` directly would force | ||
| /// `import StreamCore` (which reintroduces `log`/`ClientError`/`APIError` | ||
| /// ambiguities) in every consumer. Only stored properties (`code`, | ||
| /// `statusCode`, `message`, `unrecoverable`) are read through it, so no import | ||
| /// is needed at the use sites. | ||
| /// | ||
| /// - TODO: [StreamCore migration] This alias (and the split between hand-written | ||
| /// `StreamAPIError` and the generated `APIError`) goes away once the OpenAPI | ||
| /// generator is changed to emit `APIError` as `StreamCore.APIError`. Then the | ||
| /// whole app uses one API error type and this file can be deleted. | ||
| public typealias StreamAPIError = StreamCore.APIError | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. can't we use the APIError directly?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There are currently two nominally different APIError types: the generated StreamVideo.APIError and StreamCore.APIError. Using bare APIError resolves to the generated model, not StreamCoreβs type. StreamAPIError therefore disambiguates Core errors without requiring import StreamCore in every consumer, which would also introduce symbol collisions. ClientError.apiError remains the generated type for source compatibility, with Core errors converted at the boundary. The alias can be removed once the generated model migrates to StreamCore (which i'm not even sure if it's possible to happen as it will require backend to align the apiErrors between chat and video and potentially feeds). |
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,6 +3,7 @@ | |
| // | ||
|
|
||
| import Foundation | ||
| import StreamCore | ||
|
|
||
| extension URLRequest { | ||
| var queryItems: [URLQueryItem] { | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,6 +3,7 @@ | |
| // | ||
|
|
||
| import Foundation | ||
| import StreamCore | ||
|
|
||
| public struct FetchingLocationError: Error {} | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.