client-sdk-swift icon indicating copy to clipboard operation
client-sdk-swift copied to clipboard

About iOS Screen Share didn't work.

Open 107360111 opened this issue 1 year ago • 1 comments

Hello everyone, here is a question about broadcast.

According to the description of iOS Screen Sharing on Wiki, I have followed the instructions to set up the broadcast. Here are the App Groups and SampleHandler after setup:

App Groups:

Sample Handler:

Additionally, I have enabled the broadcast permission in the Room settings. I am using the following code to receive the localParticipant and remoteParticipant:

Room Initialization:

Control Screen Share Function:

Get Local Participant: [room(_ room: Room, participant: LocalParticipant, didPublishTrack publication: LocalTrackPublication)]

Get Remote Participant: [room(_ room: Room, participant: RemoteParticipant, didSubscribeTrack publication: RemoteTrackPublication)]

When I first press the screen sharing button, a prompt window like the one in the picture appears. After I press "Start Recording", the screen recording starts. However, in the function room(_ room: Room, participant: LocalParticipant, didPublishTrack publication: LocalTrackPublication), I did not receive the video track that I sent out. Also, in the function room(_ room: Room, participant: RemoteParticipant, didSubscribeTrack publication: RemoteTrackPublication), I did not receive the event of subscribing to my own video track.

Local Participant Start Recording:

Remote Participant Didn't Get Local Participant's screen share video track:

Local Participant Stop Recording:

Please help me to solve this question, thank you very much.

107360111 avatar Jun 03 '24 09:06 107360111

I needed to add RTCAppGroupIdentifier to both app and broadcast extension info.plist

mokuzuu avatar Jul 23 '24 06:07 mokuzuu

This example didn't work on my side too even it set the RTCAppGroupIdentifier correctly. https://github.com/livekit-examples/swift-example/blob/main/iOS/Info.plist#L47 https://github.com/livekit-examples/swift-example/blob/main/iOS/BroadcastExt/Info.plist#L32

@mokuzuu does it works after you added the RTCAppGroupIdentifier to your project? would you mind confirm this LiveKitExample.xcodeproj is working or not on your side?

ming-chu avatar Nov 11 '24 16:11 ming-chu

turns out the example was using this plist https://github.com/livekit-examples/swift-example/blob/main/Multiplatform-Info.plist and it didn't have the RTCAppGroupIdentifier

ming-chu avatar Nov 14 '24 19:11 ming-chu

Hello, may I ask why my application encounters an error timeout when using screen sharing for re signing and distributing enterprise certificates after using a paid developer account to create a test package? However, during normal local testing, screen sharing works normally.

WangDaShuai1020 avatar Nov 18 '24 22:11 WangDaShuai1020

Same situation. Is there some solution?

BasinPhoto avatar Jan 02 '25 09:01 BasinPhoto

The issue with the example plist missing RTCAppGroupIdentifier was resolved in https://github.com/livekit-examples/swift-example/pull/51, which I think was the main issue here with the original report

@WangDaShuai1020 @BasinPhoto please open new issues with more details about what you're seeing if they are still unresolved (but check latest SDK releases, a few fixes have gone in)

bcherry avatar Jan 22 '25 00:01 bcherry