From e964fc9ead9967b377c235aa6f677f1a6da7e05e Mon Sep 17 00:00:00 2001 From: Hiroshi Horie <548776+hiroshihorie@users.noreply.github.com> Date: Tue, 29 Mar 2022 16:17:25 +0900 Subject: [PATCH] re-enable broadcast ext --- LiveKitExample.xcodeproj/project.pbxproj | 35 ++++++++++++++++++++++++ Shared/ExampleObservableRoom.swift | 2 +- Shared/RoomView.swift | 14 +++++----- 3 files changed, 43 insertions(+), 8 deletions(-) diff --git a/LiveKitExample.xcodeproj/project.pbxproj b/LiveKitExample.xcodeproj/project.pbxproj index 527ccd8..3d6a735 100644 --- a/LiveKitExample.xcodeproj/project.pbxproj +++ b/LiveKitExample.xcodeproj/project.pbxproj @@ -42,8 +42,33 @@ 68B3854D271E780700711D5F /* LiveKitExample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 68B3853C271E780600711D5F /* LiveKitExample.swift */; }; 68B38550271E780700711D5F /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 68B3853E271E780700711D5F /* Assets.xcassets */; }; 68B38551271E780700711D5F /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 68B3853E271E780700711D5F /* Assets.xcassets */; }; + 68EA18E827F2E91000F9AE48 /* BroadcastExt.appex in Embed App Extensions */ = {isa = PBXBuildFile; fileRef = 683F05F3273F96B20080C7AC /* BroadcastExt.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; /* End PBXBuildFile section */ +/* Begin PBXContainerItemProxy section */ + 68EA18E927F2E91000F9AE48 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 68B38537271E780600711D5F /* Project object */; + proxyType = 1; + remoteGlobalIDString = 683F05F2273F96B20080C7AC; + remoteInfo = BroadcastExt; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 68EA18EB27F2E91100F9AE48 /* Embed App Extensions */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 13; + files = ( + 68EA18E827F2E91000F9AE48 /* BroadcastExt.appex in Embed App Extensions */, + ); + name = "Embed App Extensions"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + /* Begin PBXFileReference section */ 6816B1A7272D45DF005ADB85 /* ExampleObservableRoom.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ExampleObservableRoom.swift; sourceTree = ""; }; 6816B1AF272D9198005ADB85 /* ParticipantView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ParticipantView.swift; sourceTree = ""; }; @@ -238,10 +263,12 @@ 68B3853F271E780700711D5F /* Sources */, 68B38540271E780700711D5F /* Frameworks */, 68B38541271E780700711D5F /* Resources */, + 68EA18EB27F2E91100F9AE48 /* Embed App Extensions */, ); buildRules = ( ); dependencies = ( + 68EA18EA27F2E91000F9AE48 /* PBXTargetDependency */, ); name = "LiveKitExample (iOS)"; packageProductDependencies = ( @@ -397,6 +424,14 @@ }; /* End PBXSourcesBuildPhase section */ +/* Begin PBXTargetDependency section */ + 68EA18EA27F2E91000F9AE48 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 683F05F2273F96B20080C7AC /* BroadcastExt */; + targetProxy = 68EA18E927F2E91000F9AE48 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + /* Begin XCBuildConfiguration section */ 683F05FE273F96B20080C7AC /* Debug */ = { isa = XCBuildConfiguration; diff --git a/Shared/ExampleObservableRoom.swift b/Shared/ExampleObservableRoom.swift index af3c227..e131831 100644 --- a/Shared/ExampleObservableRoom.swift +++ b/Shared/ExampleObservableRoom.swift @@ -101,7 +101,7 @@ class ExampleObservableRoom: ObservableRoom { // return toggleScreenShareEnabled() // Experimental iOS screen share - RPSystemBroadcastPickerView.show(for: "io.livekit.example.Multiplatform-SwiftUI.BroadcastExt", + RPSystemBroadcastPickerView.show(for: "io.livekit.example.SwiftSDK.1.BroadcastExt", showsMicrophoneButton: false) if let ud = UserDefaults(suiteName: "group.livekit-example.broadcast") { diff --git a/Shared/RoomView.swift b/Shared/RoomView.swift index 7bea060..05672c5 100644 --- a/Shared/RoomView.swift +++ b/Shared/RoomView.swift @@ -297,13 +297,13 @@ struct RoomView: View { .disabled(room.microphoneTrackState.isBusy) #if os(iOS) - // Button(action: { - // room.toggleScreenShareEnabled(screenShareSource: nil) - // }, - // label: { - // Image(systemSymbol: .rectangleFillOnRectangleFill) - // .renderingMode(room.screenShareTrackState.isPublished ? .original : .template) - // }) + Button(action: { + room.toggleScreenShareEnabled(screenShareSource: nil) + }, + label: { + Image(systemSymbol: .rectangleFillOnRectangleFill) + .renderingMode(room.screenShareTrackState.isPublished ? .original : .template) + }) #elseif os(macOS) Button(action: { if room.screenShareTrackState.isPublished {