Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions .changes/drop-swift-6.0
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
minor type="changed" "Bumped minimum Swift toolchain to 6.1 (Xcode 16.3+)"
40 changes: 13 additions & 27 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,20 +26,6 @@ jobs:
fail-fast: false
matrix:
include:
# https://github.com/actions/runner-images/blob/main/images/macos/macos-14-arm64-Readme.md
- os: macos-14
xcode: 16.2
platform: "iOS Simulator,name=iPhone 16 Pro,OS=18.2"
- os: macos-14
xcode: 16.2
platform: "macOS"
- os: macos-14
xcode: 16.2
platform: "macOS,variant=Mac Catalyst"
- os: macos-14
xcode: 16.2
platform: "tvOS Simulator,name=Apple TV,OS=18.2"

# https://github.com/actions/runner-images/blob/main/images/macos/macos-15-Readme.md
- os: macos-15
xcode: 16.4
Expand All @@ -56,38 +42,38 @@ jobs:

# https://github.com/actions/runner-images/blob/main/images/macos/macos-26-arm64-Readme.md
- os: macos-26
xcode: 26.4
platform: "iOS Simulator,name=iPhone 17 Pro,OS=26.4.1"
xcode: 26.5
platform: "iOS Simulator,name=iPhone 17 Pro,OS=26.5"
symbol-graph: true
- os: macos-26
xcode: 26.4
platform: "iOS Simulator,name=iPhone 17 Pro,OS=26.4.1"
xcode: 26.5
platform: "iOS Simulator,name=iPhone 17 Pro,OS=26.5"
extension-api-only: true
- os: macos-26
xcode: 26.4
xcode: 26.5
platform: "macOS"
symbol-graph: true
- os: macos-26
xcode: 26.4
xcode: 26.5
platform: "macOS"
asan: true
- os: macos-26
xcode: 26.4
xcode: 26.5
platform: "macOS"
tsan: true
- os: macos-26
xcode: 26.4
xcode: 26.5
platform: "macOS"
strict-concurrency-env: true
- os: macos-26
xcode: 26.4
xcode: 26.5
platform: "macOS,variant=Mac Catalyst"
- os: macos-26
xcode: 26.4
platform: "visionOS Simulator,name=Apple Vision Pro,OS=26.4.1"
xcode: 26.5
platform: "visionOS Simulator,name=Apple Vision Pro,OS=26.5"
- os: macos-26
xcode: 26.4
platform: "tvOS Simulator,name=Apple TV,OS=26.4"
xcode: 26.5
platform: "tvOS Simulator,name=Apple TV,OS=26.5"

runs-on: ${{ matrix.os }}
timeout-minutes: 60
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cocoapods-lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- os: macos-15
xcode: 16.4
- os: macos-26
xcode: 26.4
xcode: 26.5
runs-on: ${{ matrix.os }}
timeout-minutes: 30
steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
strategy:
matrix:
include:
- platform: "iOS Simulator,name=iPhone 17 Pro,OS=26.4.1"
- platform: "iOS Simulator,name=iPhone 17 Pro,OS=26.5"
artifact_name: symbol-graph-ios
- platform: "macOS"
artifact_name: symbol-graph-macos
Expand Down
2 changes: 1 addition & 1 deletion .swiftformat
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
--swiftversion 6.0
--swiftversion 6.1
--exclude Sources/LiveKit/Protos
--header "/*\n * Copyright {year} LiveKit\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */"
--ifdef no-indent
Expand Down
4 changes: 2 additions & 2 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ Threading:

### Language Version

- Minimum supported Xcode is Xcode 16 (Swift 6.0); see Apple's [App Store submission requirements](https://developer.apple.com/news/upcoming-requirements/?id=02212025a)
- `Package.swift` (`swift-tools-version:6.0`) declares the **oldest** supported version
- Minimum supported Xcode is Xcode 16.3 (Swift 6.1); see Apple's [App Store submission requirements](https://developer.apple.com/news/upcoming-requirements/?id=02212025a)
- `Package.swift` (`swift-tools-version:6.1`) declares the **oldest** supported version
- Keep `Package.swift`, `LiveKitClient.podspec`, and `.swiftformat`'s `--swiftversion` in sync when changing the minimum
- New code should use the latest stable Swift version
- Some constructs require `#if swift` or `#if compiler` directives to support newer-than-minimum toolchains:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ struct BenchmarkConfig {
url: url,
apiKey: apiKey,
apiSecret: apiSecret,
mode: mode
mode: mode,
)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,13 +97,13 @@ private final class DataEchoDelegate: NSObject, RoomDelegate, @unchecked Sendabl
Task {
try? await room.localParticipant.publish(
data: data,
options: .init(topic: topic)
options: .init(topic: topic),
)
let sentTime = Int64(ProcessInfo.processInfo.systemUptime * 1_000_000)
timestamps.mutate {
$0.append(EchoParticipant.ProcessingTimestamp(
receiveUs: recvTime,
echoSentUs: sentTime
echoSentUs: sentTime,
))
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ struct TokenGenerator {
identity: String,
canPublish: Bool = true,
canSubscribe: Bool = true,
ttl: TimeInterval = 300
ttl: TimeInterval = 300,
) -> String {
let grants = VideoGrants(
roomCreate: false,
Expand All @@ -55,19 +55,19 @@ struct TokenGenerator {
canUpdateOwnMetadata: false,
ingressAdmin: false,
hidden: false,
recorder: false
recorder: false,
)

let options = TokenOptions(
ttl: ttl,
videoGrants: grants,
identity: identity,
name: identity
name: identity,
)

let credentials = ApiCredentials(
key: apiKey,
secret: apiSecret
secret: apiSecret,
)

do {
Expand Down
2 changes: 1 addition & 1 deletion Benchmarks/LiveKitBenchmark/Benchmarks.swift
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ let benchmarks: @Sendable () -> Void = {
warmupIterations: 5,
scalingFactor: .one,
maxDuration: .seconds(300),
maxIterations: 100
maxIterations: 100,
)

// Register all benchmark suites
Expand Down
8 changes: 4 additions & 4 deletions Benchmarks/LiveKitBenchmark/ConnectionBenchmark.swift
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ let connectionBenchmarks: @Sendable () -> Void = {
warmupIterations: 5,
scalingFactor: .one,
maxDuration: .seconds(300),
maxIterations: 25
)
maxIterations: 25,
),
) { benchmark in
let config = BenchmarkConfig.fromEnvironment()
let tokenGen = TokenGenerator(apiKey: config.apiKey, apiSecret: config.apiSecret)
Expand Down Expand Up @@ -101,8 +101,8 @@ let connectionBenchmarks: @Sendable () -> Void = {
warmupIterations: 5,
scalingFactor: .one,
maxDuration: .seconds(300),
maxIterations: 25
)
maxIterations: 25,
),
) { benchmark in
let config = BenchmarkConfig.fromEnvironment()
let tokenGen = TokenGenerator(apiKey: config.apiKey, apiSecret: config.apiSecret)
Expand Down
6 changes: 3 additions & 3 deletions Benchmarks/LiveKitBenchmark/DataChannelBenchmark.swift
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ let dataChannelBenchmarks: @Sendable () -> Void = {
private func registerDataChannelBenchmark(
name: String,
payloadSize: Int,
reliable: Bool
reliable: Bool,
) {
nonisolated(unsafe) var senderRoom: Room?
nonisolated(unsafe) var echo: EchoParticipant?
Expand All @@ -67,7 +67,7 @@ private func registerDataChannelBenchmark(
benchmark.startMeasurement()
try await senderRoom.localParticipant.publish(
data: payload,
options: .init(topic: "benchmark", reliable: reliable)
options: .init(topic: "benchmark", reliable: reliable),
)
try await echoReceiver.waitForData(timeout: 5.0)
benchmark.stopMeasurement()
Expand Down Expand Up @@ -104,7 +104,7 @@ private func registerDataChannelBenchmark(
senderRoom = nil
echo = nil
echoReceiver = nil
}
},
)
}

Expand Down
6 changes: 3 additions & 3 deletions Benchmarks/LiveKitBenchmark/RPCBenchmark.swift
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ let rpcBenchmarks: @Sendable () -> Void = {
private func registerRpcBenchmark(
name: String,
payloadSize: Int,
delay: UInt64
delay: UInt64,
) {
nonisolated(unsafe) var senderRoom: Room?
nonisolated(unsafe) var echo: EchoParticipant?
Expand All @@ -75,7 +75,7 @@ private func registerRpcBenchmark(
let response = try await senderRoom.localParticipant.performRpc(
destinationIdentity: Participant.Identity(from: "bench-echo"),
method: "echo",
payload: payload
payload: payload,
)
benchmark.stopMeasurement()

Expand Down Expand Up @@ -108,6 +108,6 @@ private func registerRpcBenchmark(
if let e = echo { await e.disconnect() }
senderRoom = nil
echo = nil
}
},
)
}
4 changes: 2 additions & 2 deletions Benchmarks/Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ let package = Package(
path: "LiveKitBenchmark",
plugins: [
.plugin(name: "BenchmarkPlugin", package: "package-benchmark"),
]
],
),
]
],
)
20 changes: 10 additions & 10 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// swift-tools-version:6.0
// (Xcode16.0+)
// swift-tools-version:6.1
// (Xcode16.3+)

import PackageDescription

Expand All @@ -14,7 +14,7 @@ let package = Package(
products: [
.library(
name: "LiveKit",
targets: ["LiveKit"]
targets: ["LiveKit"],
),
],
dependencies: [
Expand All @@ -28,7 +28,7 @@ let package = Package(
targets: [
.target(
name: "LKObjCHelpers",
publicHeadersPath: "include"
publicHeadersPath: "include",
),
.target(
name: "LiveKit",
Expand All @@ -43,36 +43,36 @@ let package = Package(
],
resources: [
.process("PrivacyInfo.xcprivacy"),
]
],
),
.target(
name: "LiveKitTestSupport",
dependencies: [
"LiveKit",
],
path: "Tests/LiveKitTestSupport"
path: "Tests/LiveKitTestSupport",
),
.testTarget(
name: "LiveKitCoreTests",
dependencies: [
"LiveKit",
"LiveKitTestSupport",
]
],
),
.testTarget(
name: "LiveKitAudioTests",
dependencies: [
"LiveKit",
"LiveKitTestSupport",
]
],
),
.testTarget(
name: "LiveKitObjCTests",
dependencies: [
"LiveKit",
"LiveKitTestSupport",
]
],
),
],
swiftLanguageModes: [.v5, .v6]
swiftLanguageModes: [.v5, .v6],
)
16 changes: 8 additions & 8 deletions Package@swift-6.2.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ let package = Package(
products: [
.library(
name: "LiveKit",
targets: ["LiveKit"]
targets: ["LiveKit"],
),
],
dependencies: [
Expand All @@ -29,7 +29,7 @@ let package = Package(
targets: [
.target(
name: "LKObjCHelpers",
publicHeadersPath: "include"
publicHeadersPath: "include",
),
.target(
name: "LiveKit",
Expand All @@ -44,36 +44,36 @@ let package = Package(
],
resources: [
.process("PrivacyInfo.xcprivacy"),
]
],
),
.target(
name: "LiveKitTestSupport",
dependencies: [
"LiveKit",
],
path: "Tests/LiveKitTestSupport"
path: "Tests/LiveKitTestSupport",
),
.testTarget(
name: "LiveKitCoreTests",
dependencies: [
"LiveKit",
"LiveKitTestSupport",
]
],
),
.testTarget(
name: "LiveKitAudioTests",
dependencies: [
"LiveKit",
"LiveKitTestSupport",
]
],
),
.testTarget(
name: "LiveKitObjCTests",
dependencies: [
"LiveKit",
"LiveKitTestSupport",
]
],
),
],
swiftLanguageModes: [.v5, .v6]
swiftLanguageModes: [.v5, .v6],
)
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ Make sure any access to your app's UI elements are from the main thread, for exa

### Swift 6

LiveKit is currently compiled using Swift 6.0 with full support for strict concurrency. Apps compiled in Swift 6 language mode will not need to use `@preconcurrency` or `@unchecked Sendable` to access LiveKit classes.
LiveKit is currently compiled using Swift 6.1 with full support for strict concurrency. Apps compiled in Swift 6 language mode will not need to use `@preconcurrency` or `@unchecked Sendable` to access LiveKit classes.

### Memory management

Expand Down
Loading
Loading