Skip to content

Commit

Permalink
Update for SDK v2.0.14 and lower iOS ver requirement
Browse files Browse the repository at this point in the history
  • Loading branch information
hiroshihorie committed Sep 5, 2024
1 parent 15b218d commit 9a76200
Show file tree
Hide file tree
Showing 9 changed files with 98 additions and 36 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/vapor/jwt-kit.git",
"state" : {
"revision" : "e05513b5aec24f88012b6e3034115b6bc915356a",
"version" : "4.13.2"
"revision" : "c2595b9ad7f512d7f334830b4df1fed6e917946a",
"version" : "4.13.4"
}
},
{
Expand Down Expand Up @@ -77,8 +77,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-protobuf.git",
"state" : {
"revision" : "65e8f29b2d63c4e38e736b25c27b83e012159be8",
"version" : "1.25.2"
"revision" : "edb6ed4919f7756157fe02f2552b7e3850a538e5",
"version" : "1.28.1"
}
},
{
Expand All @@ -104,8 +104,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/livekit/webrtc-xcframework.git",
"state" : {
"revision" : "56e5119f00daa2e42e10670d29ae2edbff6be961",
"version" : "114.5735.13"
"revision" : "9b8d54b203247a84d5f2a9f682d75f4129d0b09b",
"version" : "125.6422.7"
}
}
],
Expand Down
30 changes: 24 additions & 6 deletions LiveKitLivestreamExample.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,8 @@
682937662A59498800BC8CD7 /* XCRemoteSwiftPackageReference "SFSafeSymbols" */,
68D594E22A78B1C400ABBD2C /* XCRemoteSwiftPackageReference "AlertToast" */,
68D594E62A78C67500ABBD2C /* XCRemoteSwiftPackageReference "Nuke" */,
68B3C3782C897990008338EC /* XCRemoteSwiftPackageReference "client-sdk-swift" */,
68B3C3792C8979B6008338EC /* XCRemoteSwiftPackageReference "client-components-swift" */,
);
productRefGroup = 683865A22A29F9A3005D0947 /* Products */;
projectDirPath = "";
Expand Down Expand Up @@ -546,7 +548,7 @@
ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = NO;
CODE_SIGN_ENTITLEMENTS = macOS/macOS.entitlements;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 7;
CURRENT_PROJECT_VERSION = 2024090501;
DEVELOPMENT_TEAM = 76TVFCUKK7;
ENABLE_HARDENED_RUNTIME = YES;
ENABLE_PREVIEWS = YES;
Expand All @@ -565,11 +567,11 @@
"INFOPLIST_KEY_UIStatusBarStyle[sdk=iphonesimulator*]" = UIStatusBarStyleDefault;
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
IPHONEOS_DEPLOYMENT_TARGET = 16.4;
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
LD_RUNPATH_SEARCH_PATHS = "@executable_path/Frameworks";
"LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "@executable_path/../Frameworks";
MACOSX_DEPLOYMENT_TARGET = 13.3;
MARKETING_VERSION = 1.0.7;
MARKETING_VERSION = 2.0.14;
PRODUCT_BUNDLE_IDENTIFIER = io.livekit.example.livestream;
PRODUCT_NAME = "LK Live";
SDKROOT = auto;
Expand All @@ -590,7 +592,7 @@
ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = NO;
CODE_SIGN_ENTITLEMENTS = macOS/macOS.entitlements;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 7;
CURRENT_PROJECT_VERSION = 2024090501;
DEVELOPMENT_TEAM = 76TVFCUKK7;
ENABLE_HARDENED_RUNTIME = YES;
ENABLE_PREVIEWS = YES;
Expand All @@ -609,11 +611,11 @@
"INFOPLIST_KEY_UIStatusBarStyle[sdk=iphonesimulator*]" = UIStatusBarStyleDefault;
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
IPHONEOS_DEPLOYMENT_TARGET = 16.4;
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
LD_RUNPATH_SEARCH_PATHS = "@executable_path/Frameworks";
"LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "@executable_path/../Frameworks";
MACOSX_DEPLOYMENT_TARGET = 13.3;
MARKETING_VERSION = 1.0.7;
MARKETING_VERSION = 2.0.14;
PRODUCT_BUNDLE_IDENTIFIER = io.livekit.example.livestream;
PRODUCT_NAME = "LK Live";
SDKROOT = auto;
Expand Down Expand Up @@ -736,6 +738,22 @@
minimumVersion = 4.0.0;
};
};
68B3C3782C897990008338EC /* XCRemoteSwiftPackageReference "client-sdk-swift" */ = {
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/livekit/client-sdk-swift";
requirement = {
kind = exactVersion;
version = 2.0.14;
};
};
68B3C3792C8979B6008338EC /* XCRemoteSwiftPackageReference "client-components-swift" */ = {
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/livekit/client-components-swift";
requirement = {
kind = upToNextMajorVersion;
minimumVersion = 0.0.1;
};
};
68D594E22A78B1C400ABBD2C /* XCRemoteSwiftPackageReference "AlertToast" */ = {
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/elai950/AlertToast";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"originHash" : "fb2ee28f8532e1f40245d54d45d0f70907f12918f6e920c3b5d7d2afa4d0bef5",
"pins" : [
{
"identity" : "alerttoast",
Expand All @@ -9,6 +10,24 @@
"version" : "1.3.9"
}
},
{
"identity" : "client-components-swift",
"kind" : "remoteSourceControl",
"location" : "https://github.com/livekit/client-components-swift",
"state" : {
"revision" : "82fc74016db420393f425f54af12b5467f668e1f",
"version" : "0.0.1"
}
},
{
"identity" : "client-sdk-swift",
"kind" : "remoteSourceControl",
"location" : "https://github.com/livekit/client-sdk-swift",
"state" : {
"revision" : "0c6b9686235a56ea1961746ac750c524836be5ee",
"version" : "2.0.14"
}
},
{
"identity" : "nuke",
"kind" : "remoteSourceControl",
Expand All @@ -32,8 +51,17 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-log",
"state" : {
"revision" : "532d8b529501fb73a2455b179e0bbb6d49b652ed",
"version" : "1.5.3"
"revision" : "9cb486020ebf03bfa5b5df985387a14a98744537",
"version" : "1.6.1"
}
},
{
"identity" : "swift-protobuf",
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-protobuf.git",
"state" : {
"revision" : "edb6ed4919f7756157fe02f2552b7e3850a538e5",
"version" : "1.28.1"
}
},
{
Expand All @@ -53,7 +81,16 @@
"revision" : "3042f0cf4b9f0d5b0bb08ad17f742a43bc4fdfc5",
"version" : "2.8.0"
}
},
{
"identity" : "webrtc-xcframework",
"kind" : "remoteSourceControl",
"location" : "https://github.com/livekit/webrtc-xcframework.git",
"state" : {
"revision" : "9b8d54b203247a84d5f2a9f682d75f4129d0b09b",
"version" : "125.6422.7"
}
}
],
"version" : 2
"version" : 3
}
2 changes: 1 addition & 1 deletion Shared/Sheets/OptionsSheet.swift
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ struct OptionsSheet: View {
}
.backport.presentationDetents([.medium])
.backport.presentationDragIndicator(.visible)
.presentationBackground(.black)
// .presentationBackground(.black)
.padding()
.frame(minWidth: 300)
.toast(isPresenting: $showCopiedToast) {
Expand Down
2 changes: 1 addition & 1 deletion Shared/Sheets/UsersSheet.swift
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ struct UsersSheet: View {
}
.backport.presentationDetents([.medium, .large])
.backport.presentationDragIndicator(.visible)
.presentationBackground(.black)
// .presentationBackground(.black)
.padding()
.frame(minWidth: 370)
}
Expand Down
2 changes: 1 addition & 1 deletion Shared/Views/MessageBarView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ struct MessageBarView: View {

var body: some View {
HStack {
TextField("", text: $roomCtx.message, axis: .vertical)
TextField("", text: $roomCtx.message)
.focused($focusFields, equals: .message)
.lineLimit(5)
.font(.system(size: 12))
Expand Down
2 changes: 1 addition & 1 deletion Shared/Views/PublisherVideoView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ struct PublisherVideoView: View {

struct SubscriberVideoView: View {
@EnvironmentObject var room: Room
@EnvironmentObject var ui: UIPreference
@EnvironmentObject var ui: UIOptions

var body: some View {
ZStack(alignment: .topLeading) {
Expand Down
7 changes: 3 additions & 4 deletions Shared/Views/StyledButton.swift
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ struct StyledButton<Label>: View where Label: View {
var style: StyledButtonStyle = .normal
var size: StyledButtonSize = .normal
var isFullWidth = true
var isBusy: Bool = false
var isEnabled: Bool = true
var isBusy = false
var isEnabled = true

let action: () -> Void
let label: () -> Label
Expand All @@ -61,8 +61,7 @@ struct StyledButton<Label>: View where Label: View {
.controlSize(.small)
}
label()
.font(.system(size: size.toFontSize()))
.fontWeight(.bold)
.font(.system(size: size.toFontSize(), weight: .bold))
}
.padding(.horizontal, size.toHPadding())
.padding(.vertical, size.toVPadding())
Expand Down
34 changes: 21 additions & 13 deletions Shared/Views/SwitchCameraButton.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,22 +21,30 @@ struct SwitchCameraButton: View {
@EnvironmentObject var room: Room
@EnvironmentObject var participant: Participant

@State var canSwitchPosition = false

var body: some View {
if participant is LocalParticipant, CameraCapturer.canSwitchPosition() {
StyledButton(style: .clear,
isFullWidth: false)
{
Task {
if let track = participant.firstCameraVideoTrack as? LocalVideoTrack,
let cameraCapturer = track.capturer as? CameraCapturer
{
try await cameraCapturer.switchCameraPosition()
Group {
if participant is LocalParticipant, canSwitchPosition {
StyledButton(style: .clear,
isFullWidth: false)
{
Task {
if let track = participant.firstCameraVideoTrack as? LocalVideoTrack,
let cameraCapturer = track.capturer as? CameraCapturer
{
try await cameraCapturer.switchCameraPosition()
}
}
} label: {
Image(systemName: "arrow.triangle.2.circlepath")
}
} label: {
Image(systemName: "arrow.triangle.2.circlepath")
.cornerRadius(6)
}
}.onAppear(perform: {
Task { @MainActor in
canSwitchPosition = try await CameraCapturer.canSwitchPosition()
}
.cornerRadius(6)
}
})
}
}

0 comments on commit 9a76200

Please sign in to comment.