Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

After pulling the source code locally, some Delegates will report errors #414

Open
wzJun1 opened this issue Jun 27, 2024 · 7 comments
Open
Assignees
Labels
bug Something isn't working

Comments

@wzJun1
Copy link

wzJun1 commented Jun 27, 2024

Describe the bug
After pulling the source code locally, some Delegates will report errors

SDK Version
2.0.10 ~ 2.0.11

iOS/macOS Version
iOS17.2

Steps to Reproduce

No need for Swift Package Manager, simply pull the source code locally

  1. Connect Room
  2. Open Camera
  3. Crash

If I remove @objc, it will work normally. (or do I just use newValue?.delegates.add(delegate: self) It also works (but the entire livekit sdk has too many delegates, it is too troublesome to change them all)

I feel like it's a problem with the Swift version being too high, but I don't know how to solve it.

Screenshots
171719461830_ pic
iShot_2024-06-27_12 17 30

@wzJun1 wzJun1 added the bug Something isn't working label Jun 27, 2024
@hiroshihorie
Copy link
Member

hiroshihorie commented Jun 27, 2024

  1. Can you tell me your Xcode version?
  2. Are you using the SDK with Objective-C or Swift?
  3. Is it reproducible for you?

@wzJun1
Copy link
Author

wzJun1 commented Jun 27, 2024

  1. Xcode 15.4 and Swift 5.10
  2. Swift
  3. Yes

@wzJun1
Copy link
Author

wzJun1 commented Jun 27, 2024

My current solution is to no longer use add and remove with @objc, but instead use xxx.delegates.add() directly.

eg:

iShot_2024-06-27_14 55 59 iShot_2024-06-27_14 56 07

@hiroshihorie
Copy link
Member

Hmm.. It's odd that you need to do that, is it only with TrackDelegate ?

@wzJun1
Copy link
Author

wzJun1 commented Jun 27, 2024

Not only 'TrackDelegate', but all delegate add remove with @objc, as shown in the screenshot below, are like this.

iShot_2024-06-27_17 50 57 iShot_2024-06-27_17 52 21

@hiroshihorie
Copy link
Member

Hmm looks like some Xcode bug, I'm not sure how to reproduce this at the moment.

@wzJun1
Copy link
Author

wzJun1 commented Jul 6, 2024

Okay, then I will continue to follow up

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants