This message was deleted.
# helpdesk
s
This message was deleted.
p
Is it possible at swift end ? I need to change it from swift side.
d
not yet. currently this is a server API
p
OK One more question. func room(_ room: Room, participant: RemoteParticipant?, didReceive data: Data) This delegate not call, when room admin changed my permission
👀 1
d
that is not the delegate for when permissions changes
p
Yes, this is not that delegate. This delegate will call when receive any data from server. But when server send data to swift app, above delegate is not calling. Just want to know for handing this delegate participant need any permission. Bcoz when user has join canPublish and canSubscribe true, then this delegate is calling and works fine. But case is that when user has join room canPublish and canSubscribe false, This delegate never called. even after change permission its not called.
d
sorry but I'm a bit confused here.. when you change a user's permission, the delegate you pasted,
didReceive data
is not supposed to be called.
p
Hi David, Can you let me know any time when we connect if possible. So I can clear you my situation.
Yes, Will not call when user permission has change.
As I understand this delegate not depends on user permission. But when user join as canPublish and canSubscribe true it is working fine. Then problem is that when user join as canPublish and canSubscribe false this delegate method is not calling.
I have checked same scenario in android and web, this method is calling with canPublish and canSubscribe false, but it's no calling in swift SDK.
d
I'm still not understanding.. could you paste the code snippet of what you ran that would trigger the above delegate?
p
In my project there are 2 way to create a meeting 1) Meeting without waiting room :- It is simple meeting and we share meeting id with users, users can join meeting with the meeting id. He has canPublish and canSubscribe both permission true and in this situation all works fine everything as expected. did receive data function also works for events and messages. 2.) Meeting with waiting room :- It is meeting has waiting lounge enable so host / admin has rights to accept or reject their joining request. We consume our internal api . Now in that case only room host/ admin has permission canPublish and canSubscribe true and all others have these permission false. Now when room admin join room he has both permission true and receive data delegate calling perfect, But problem is that when other users (Not admin and having both permission false), receive data delegate not call for the user who has join both permission false.
So As my observations, did receive data delegate not calling for those user's who are joining room with canPublish and canSubscribe false. Bcoz in waiting room meeting other uses are by default joining with canPublish and canSubscribe false permission. for other user this pemission will be true when admin allow there requests in room.
d
I see, thank you for the detailed explanation. Now I understand what's happening. I can confirm that you don't need
canSubscribe
or
canPublish
in order to receive data messages. Are you able to reproduce this with our JS sample app?
p
Hi David, I am not able to test in JS sample app, But this is exist in swift example. https://github.com/livekit-examples/swift-example I am swift developer so confirmable with the swift. But when I tested same case android developer and JS developer, This scenario is working fine.
@dry-elephant-14928 Did you find any solution for it. My delivery is on hold due to this issue. Can you please solution for it.
Hi David
Hi David
Can you please help for this issue? I am complete stuck here.
Any update ?
d
@purple-carpenter-48037, we don't have a clear idea on what you are doing or why it doesn't work. I've asked you to try the same behavior in our JS sample app, but it sounds like you are unwilling to. Can you reproduce it in our example app? If so give us the steps and we are more than happy to try it. Otherwise I'm not sure how we can help here.
p
Issue: Unable to receive data / permissions update only when initial permissions are set to false at the time of generating the token. Prerequisites: livekit-cli livekit-cloud account project : https://github.com/livekit-examples/swift-example Steps to reproduce the issue: 1. Generate token (please note the initial permissions are set to false) livekit-cli create-token --api-key API4cb8pbrAQPL8 --api-secret pMNZzkNWfUUzIeDmEUtul9vFQOT8T3amf52c5JfprYND --join --room permissions4Test --identity user1 --grant '{"canSubscribe":false,"canPublish":false,"canPublishData":false}' 2. URL: wss://demo-s8zwk6eo.livekit.cloud 3. Join with the given url and token you received from terminal using the above command (please use the sample iOS project : https://github.com/livekit-examples/swift-example) 4. Now use livekit-cli send-data or update-permission (note you will not receive such events in the SDK) livekit-cli send-data --url wss://demo-s8zwk6eo.livekit.cloud --api-key API4cb8pbrAQPL8 --api-secret pMNZzkNWfUUzIeDmEUtul9vFQOT8T3amf52c5JfprYND --room permissions4Test --data sample --topic test Working use-case: It will work as expected if the initial permissions are set to true livekit-cli create-token --api-key API4cb8pbrAQPL8 --api-secret pMNZzkNWfUUzIeDmEUtul9vFQOT8T3amf52c5JfprYND --join --room permissions4Test --identity user1 --grant '{"canSubscribe":true,"canPublish":true,"canPublishData":true}' Now if you join with the generated token you can able to receive the events send-data / update-participant sent from the cli.
I'm using below versions.
Hi David. can you please check and update me.
Hi David I have applied all possible solutions, even I have check with Pods and dependencies both. But same issue. Can you please help me out here. This feature is already done in web and android in out application. We can not go for live until it's not completed in iOS. Please help and look on it.
d
Thanks for the repro steps, will give it a try when I have time next week.
p
OK David.
Hi David Did you get chance to look on it?
d
not yet will take a look by this weekend
p
OK David.
Hi David Request to you. Please look on this scenario on this weekend.
Hi David Did you get chance to look on it.
d
I'm behind on several things and did not get a chance. my apologies. Will try to get to it tomorrow.
p
ok please.
d
@purple-carpenter-48037 I'm able to reproduce this behavior.. This happens because you are disallowing the user to subscribe to any tracks with
canSubscribe: false
When this is the case, the client does not negotiate a subscriber connection with the server, hence causing it to not be able to receive any data messages. (Data messages are sent over subscriber peer connection)