Skip to content

Commit 1a0cd48

Browse files
authored
Merge branch 'develop' into enhancement/increase-spm-swift-version
2 parents 8721b34 + 5c2224c commit 1a0cd48

File tree

64 files changed

+1163
-198
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+1163
-198
lines changed

CHANGELOG.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,34 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
44

55
# Upcoming
66

7+
### ✅ Added
8+
- `CallViewController` was updated to accept the `video` flag when starting a call. [#811](https://github.com/GetStream/stream-video-swift/pull/811)
9+
10+
# [1.22.2](https://github.com/GetStream/stream-video-swift/releases/tag/1.22.2)
11+
_May 13, 2025_
12+
13+
### 🐞 Fixed
14+
- Fix an issue that was causing CallSettings misalignment during reconnection [#810](https://github.com/GetStream/stream-video-swift/pull/810)
15+
- Synchronize CallKit audioSession with the audioSession in the app. [#807](https://github.com/GetStream/stream-video-swift/pull/807)
16+
17+
# [1.22.1](https://github.com/GetStream/stream-video-swift/releases/tag/1.22.1)
18+
_May 08, 2025_
19+
20+
### 🐞 Fixed
21+
- Fix an issue that when the app was becoming active from the application switcher, Picture-in-Picture wasn't stopped. [#803](https://github.com/GetStream/stream-video-swift/pull/803)
22+
23+
### 🔄 Changed
24+
- Update OutgoingCallView to get updates from ringing call [#798](https://github.com/GetStream/stream-video-swift/pull/798)
25+
26+
# [1.22.0](https://github.com/GetStream/stream-video-swift/releases/tag/1.22.0)
27+
_May 05, 2025_
28+
729
### ✅ Added
830
- You can now configure policies based on the the device's proximity information. Those policies can be used to toggle speaker and video. [#770](https://github.com/GetStream/stream-video-swift/pull/770)
931

1032
### 🐞 Fixed
1133
- Fix ringing flow issues. [#792](https://github.com/GetStream/stream-video-swift/pull/792)
34+
- Fix a few points that were negatively affecting Picture-in-Picture lifecycle. [#796](https://github.com/GetStream/stream-video-swift/pull/796)
1235

1336
# [1.21.1](https://github.com/GetStream/stream-video-swift/releases/tag/1.21.1)
1437
_April 25, 2025_

DemoApp/Resources/Entitlements/DemoApp-Debug.entitlements

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,12 @@
66
<string>development</string>
77
<key>com.apple.developer.associated-domains</key>
88
<array>
9-
<string>applinks:getstream.io</string>
9+
<string>applinks:getstream.io</string>
10+
<string>applinks:pronto.getstream.io</string>
11+
<string>applinks:pronto-staging.getstream.io</string>
12+
<string>applinks:staging.getstream.io</string>
13+
<string>applinks:stream-calls-dogfood.vercel.app</string>
14+
<string>applinks:livestream-react-demo.vercel.app</string>
1015
</array>
1116
<key>com.apple.security.application-groups</key>
1217
<array>

DemoApp/Resources/Entitlements/DemoApp.entitlements

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@
77
<key>com.apple.developer.associated-domains</key>
88
<array>
99
<string>applinks:getstream.io</string>
10+
<string>applinks:pronto.getstream.io</string>
11+
<string>applinks:pronto-staging.getstream.io</string>
12+
<string>applinks:staging.getstream.io</string>
13+
<string>applinks:stream-calls-dogfood.vercel.app</string>
14+
<string>applinks:livestream-react-demo.vercel.app</string>
1015
</array>
1116
<key>com.apple.security.application-groups</key>
1217
<array>

DemoApp/Sources/Views/CallView/DemoSnapshotViewModel.swift

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// Copyright © 2025 Stream.io Inc. All rights reserved.
33
//
44

5+
import Combine
56
import Foundation
67
import StreamVideo
78
import StreamVideoSwiftUI
@@ -11,7 +12,7 @@ import SwiftUI
1112
final class DemoSnapshotViewModel: ObservableObject {
1213

1314
private let viewModel: CallViewModel
14-
private var snapshotEventsTask: Task<Void, Never>?
15+
private var cancellable: AnyCancellable?
1516

1617
@Published var toast: Toast?
1718

@@ -21,27 +22,31 @@ final class DemoSnapshotViewModel: ObservableObject {
2122
}
2223

2324
private func subscribeForSnapshotEvents() {
25+
cancellable?.cancel()
26+
cancellable = nil
27+
2428
guard let call = viewModel.call else {
25-
snapshotEventsTask?.cancel()
26-
snapshotEventsTask = nil
2729
return
2830
}
2931

30-
snapshotEventsTask = Task {
31-
for await event in call.subscribe(for: CustomVideoEvent.self) {
32+
cancellable = call
33+
.eventPublisher(for: CustomVideoEvent.self)
34+
.compactMap {
3235
guard
33-
let imageBase64Data = event.custom["snapshot"]?.stringValue,
36+
let imageBase64Data = $0.custom["snapshot"]?.stringValue,
3437
let imageData = Data(base64Encoded: imageBase64Data),
3538
let image = UIImage(data: imageData)
3639
else {
37-
return
40+
return nil
3841
}
39-
40-
toast = .init(
42+
return image
43+
}
44+
.map {
45+
Toast(
4146
style: .custom(
4247
baseStyle: .success,
4348
icon: AnyView(
44-
Image(uiImage: image)
49+
Image(uiImage: $0)
4550
.resizable()
4651
.frame(maxWidth: 30, maxHeight: 30)
4752
.aspectRatio(contentMode: .fit)
@@ -51,6 +56,6 @@ final class DemoSnapshotViewModel: ObservableObject {
5156
message: "Snapshot captured!"
5257
)
5358
}
54-
}
59+
.assign(to: \.toast, on: self)
5560
}
5661
}

Gemfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }
66

77
gem 'danger', group: :danger_dependencies
88
gem 'fastlane', group: :fastlane_dependencies
9-
gem 'jazzy'
109
gem 'json'
1110
gem 'rubocop', '1.38', group: :rubocop_dependencies
1211
gem 'sinatra', group: :sinatra_dependencies

Gemfile.lock

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -265,16 +265,6 @@ GEM
265265
mutex_m
266266
i18n (1.14.7)
267267
concurrent-ruby (~> 1.0)
268-
jazzy (0.15.3)
269-
cocoapods (~> 1.5)
270-
mustache (~> 1.1)
271-
open4 (~> 1.3)
272-
redcarpet (~> 3.4)
273-
rexml (>= 3.2.7, < 4.0)
274-
rouge (>= 2.0.6, < 5.0)
275-
sassc (~> 2.1)
276-
sqlite3 (~> 1.3)
277-
xcinvoke (~> 0.3.0)
278268
jmespath (1.6.2)
279269
json (2.11.3)
280270
jwt (2.10.1)
@@ -283,7 +273,6 @@ GEM
283273
rexml (>= 3.3.9)
284274
kramdown-parser-gfm (1.1.0)
285275
kramdown (~> 2.0)
286-
liferaft (0.0.6)
287276
logger (1.7.0)
288277
method_source (1.1.0)
289278
mini_magick (4.13.2)
@@ -293,7 +282,6 @@ GEM
293282
molinillo (0.8.0)
294283
multi_json (1.15.0)
295284
multipart-post (2.4.1)
296-
mustache (1.1.1)
297285
mustermann (3.0.3)
298286
ruby2_keywords (~> 0.0.1)
299287
mutex_m (0.3.0)
@@ -339,7 +327,6 @@ GEM
339327
rainbow (3.1.1)
340328
rake (13.2.1)
341329
rchardet (1.9.0)
342-
redcarpet (3.6.1)
343330
regexp_parser (2.10.0)
344331
representable (3.2.0)
345332
declarative (< 0.1.0)
@@ -370,8 +357,6 @@ GEM
370357
ruby-progressbar (1.13.0)
371358
ruby2_keywords (0.0.5)
372359
rubyzip (2.4.1)
373-
sassc (2.4.0)
374-
ffi (~> 1.9)
375360
sawyer (0.9.2)
376361
addressable (>= 2.3.5)
377362
faraday (>= 0.17.3, < 3)
@@ -398,8 +383,6 @@ GEM
398383
clamp (~> 1.3)
399384
nokogiri (>= 1.14.3)
400385
xcodeproj (~> 1.27)
401-
sqlite3 (1.7.3)
402-
mini_portile2 (~> 2.8.0)
403386
sysrandom (1.0.5)
404387
terminal-notifier (2.0.0)
405388
terminal-table (3.0.2)
@@ -417,8 +400,6 @@ GEM
417400
uber (0.1.0)
418401
unicode-display_width (2.6.0)
419402
word_wrap (1.0.0)
420-
xcinvoke (0.3.0)
421-
liferaft (~> 0.0.6)
422403
xcodeproj (1.27.0)
423404
CFPropertyList (>= 2.3.3, < 4.0)
424405
atomos (~> 0.1.3)
@@ -445,7 +426,6 @@ DEPENDENCIES
445426
fastlane-plugin-lizard
446427
fastlane-plugin-stream_actions (= 0.3.79)
447428
fastlane-plugin-versioning
448-
jazzy
449429
json
450430
plist
451431
puma

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99
<a href="https://swift.org"><img src="https://img.shields.io/badge/Swift-6.0%2B-orange.svg" /></a>
1010
</p>
1111
<p align="center">
12-
<img id="stream-video-label" alt="StreamVideo" src="https://img.shields.io/badge/StreamVideo-7.48%20MB-blue"/>
13-
<img id="stream-video-swiftui-label" alt="StreamVideoSwiftUI" src="https://img.shields.io/badge/StreamVideoSwiftUI-2.25%20MB-blue"/>
14-
<img id="stream-video-uikit-label" alt="StreamVideoUIKit" src="https://img.shields.io/badge/StreamVideoUIKit-2.37%20MB-blue"/>
12+
<img id="stream-video-label" alt="StreamVideo" src="https://img.shields.io/badge/StreamVideo-7.54%20MB-blue"/>
13+
<img id="stream-video-swiftui-label" alt="StreamVideoSwiftUI" src="https://img.shields.io/badge/StreamVideoSwiftUI-2.26%20MB-blue"/>
14+
<img id="stream-video-uikit-label" alt="StreamVideoUIKit" src="https://img.shields.io/badge/StreamVideoUIKit-2.38%20MB-blue"/>
1515
<img id="stream-web-rtc-label" alt="StreamWebRTC" src="https://img.shields.io/badge/StreamWebRTC-9.85%20MB-blue"/>
1616
</p>
1717

Sources/StreamVideo/Call.swift

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1428,6 +1428,20 @@ public class Call: @unchecked Sendable, WSEventsSubscriber {
14281428
)
14291429
}
14301430

1431+
/// Notifies the `Call` instance that CallKit has activated the system audio
1432+
/// session.
1433+
///
1434+
/// This method should be called when the system activates the `AVAudioSession`
1435+
/// as a result of an incoming or outgoing CallKit-managed call. It allows the
1436+
/// call to update the provided CallKit AVAudioSession based on the internal CallSettings.
1437+
///
1438+
/// - Parameter audioSession: The active `AVAudioSession` instance provided by
1439+
/// CallKit.
1440+
/// - Throws: An error if the call controller fails to handle the activation.
1441+
internal func callKitActivated(_ audioSession: AVAudioSessionProtocol) throws {
1442+
try callController.callKitActivated(audioSession)
1443+
}
1444+
14311445
// MARK: - private
14321446

14331447
private func updatePermissions(

Sources/StreamVideo/CallKit/CallKitService.swift

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -327,6 +327,16 @@ open class CallKitService: NSObject, CXProviderDelegate, @unchecked Sendable {
327327
""",
328328
subsystems: .callKit
329329
)
330+
331+
if
332+
let active,
333+
let call = callEntry(for: active)?.call {
334+
do {
335+
try call.callKitActivated(audioSession)
336+
} catch {
337+
log.error(error, subsystems: .callKit)
338+
}
339+
}
330340
}
331341

332342
public func provider(

Sources/StreamVideo/Controllers/CallController.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -495,6 +495,10 @@ class CallController: @unchecked Sendable {
495495
.sink { [weak self] in self?.webRTCClientDidUpdateStage($0) }
496496
}
497497

498+
internal func callKitActivated(_ audioSession: AVAudioSessionProtocol) throws {
499+
try webRTCCoordinator.callKitActivated(audioSession)
500+
}
501+
498502
// MARK: - private
499503

500504
private func handleParticipantsUpdated() {

0 commit comments

Comments
 (0)