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
4 changes: 4 additions & 0 deletions .github/size-check/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Generated by xcodegen at run time.
SizeCheck.xcodeproj/
EmptyApp/Info.plist
LiveKitApp/Info.plist
26 changes: 26 additions & 0 deletions .github/size-check/EmptyApp/App.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/*
* Copyright 2026 LiveKit
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

import SwiftUI

@main
struct EmptyApp: App {
var body: some Scene {
WindowGroup {
Text("Hello, World!")
}
}
}
65 changes: 65 additions & 0 deletions .github/size-check/LiveKitApp/App.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
/*
* Copyright 2026 LiveKit
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

import LiveKit
import SwiftUI

// Exercises a representative slice of the public API (connect + publish camera/mic
// + a video view) so the linker keeps the main code paths.
@MainActor
final class CallModel: ObservableObject, RoomDelegate {
let room = Room()

init() {
room.add(delegate: self)
}

func connect() async {
do {
try await room.connect(url: "wss://example.livekit.cloud", token: "dev-token")
try await room.localParticipant.setCamera(enabled: true)
try await room.localParticipant.setMicrophone(enabled: true)
} catch {
print("Failed to connect: \(error)")
}
}

nonisolated func room(
_: Room,
participant _: LocalParticipant,
didPublishTrack publication: LocalTrackPublication,
) {
guard publication.track is VideoTrack else { return }
print("Published a video track")
}
}

@main
struct LiveKitApp: App {
@StateObject private var model = CallModel()

var body: some Scene {
WindowGroup {
VStack {
Text("LiveKit Hello World")
if let track = model.room.localParticipant.localVideoTracks.first?.track as? VideoTrack {
SwiftUIVideoView(track)
}
}
.task { await model.connect() }
}
}
}
64 changes: 64 additions & 0 deletions .github/size-check/project.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: SizeCheck
options:
bundleIdPrefix: io.livekit.sizecheck
deploymentTarget:
iOS: "26.0"
createIntermediateGroups: true

# Local SDK under test = the repo root (this PR's checkout), two levels up.
packages:
LiveKit:
path: ../..

settings:
base:
CODE_SIGNING_ALLOWED: "NO"
CODE_SIGNING_REQUIRED: "NO"
CODE_SIGN_IDENTITY: ""
ENABLE_BITCODE: "NO"
SWIFT_OPTIMIZATION_LEVEL: "-O"
DEAD_CODE_STRIPPING: "YES"

targets:
EmptyApp:
type: application
platform: iOS
sources: [EmptyApp]
# xcodegen generates this Info.plist during `generate` (gitignored, not committed).
info:
path: EmptyApp/Info.plist
properties:
UILaunchScreen: {}
settings:
base:
PRODUCT_BUNDLE_IDENTIFIER: io.livekit.sizecheck.empty

LiveKitApp:
type: application
platform: iOS
sources: [LiveKitApp]
dependencies:
- package: LiveKit
product: LiveKit
info:
path: LiveKitApp/Info.plist
properties:
UILaunchScreen: {}
settings:
base:
PRODUCT_BUNDLE_IDENTIFIER: io.livekit.sizecheck.livekit
# Per-target link map (unique path) for per-library executable attribution.
LD_GENERATE_MAP_FILE: "YES"
LD_MAP_FILE_PATH: "$(TARGET_TEMP_DIR)/LiveKitApp-LinkMap.txt"

schemes:
EmptyApp:
build:
targets: { EmptyApp: all }
archive:
config: Release
LiveKitApp:
build:
targets: { LiveKitApp: all }
archive:
config: Release
Loading
Loading