[iOS] Opus: audio codec causes crashes on iPad devices
Hi, with @SabeeenoGH and @potitoaghilar We've encountered an issue on iPad devices.
Unity: 2022.3.50f1 or 6000.0.49f Livekit 1.2.4.
When a room is created and the microphone is subsequently published, after a few seconds the app freezes and then crashes.
The problem appears to be caused by Opus, which handles the audio codec, the problem seems to be both in the decoding and decoder phases.
During testing we tried to create the room without publishing the microphone and only the video, the crash in that case did not occur.
To publish the microphone I used the official code that are in the README.
In the attachment you can see on XCode the moment when the crash occurs and the message regarding Opus
Please refer to this docs to adjust the link order of libiPhone-lib.a to the end
https://github.com/livekit/client-sdk-unity?tab=readme-ov-file#ios
Hi @cloudwebrtc,
considering your comment, we have solved the issue by swapping the linking order to liblivekit_ffi.a and libiPhone-lib.a in Xcode.
We suggest a clarification in the README related to the operations to apply in Xcode to correctly reorder the libraries. Using the latest version of Xcode (16.4 - 16F6), we managed to reorder the library linking order by directly dragging them in the Build Phases > Link Binary With Libraries section. On the other hand, following only the suggestion of removing and adding again the libiPhone-lib.a library is not working in our scenario.