-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Handle call sync between callViewModel, callKitService and different …
…devices (#415)
- Loading branch information
1 parent
b970994
commit bc46a4b
Showing
10 changed files
with
305 additions
and
147 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
Sources/StreamVideo/Utils/UUIDProviding/StreamUUIDFactory.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
// | ||
// Copyright © 2024 Stream.io Inc. All rights reserved. | ||
// | ||
|
||
import Foundation | ||
|
||
protocol UUIDProviding { | ||
func get() -> UUID | ||
} | ||
|
||
enum UUIDProviderKey: InjectionKey { | ||
static var currentValue: UUIDProviding = StreamUUIDFactory() | ||
} | ||
|
||
extension InjectedValues { | ||
var uuidFactory: UUIDProviding { | ||
get { Self[UUIDProviderKey.self] } | ||
set { Self[UUIDProviderKey.self] = newValue } | ||
} | ||
} | ||
|
||
struct StreamUUIDFactory: UUIDProviding { | ||
func get() -> UUID { .init() } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.