Version of the agora_rtc_engine
6.5.3, 6.6.2
Platforms affected
Steps to reproduce
- Use the example project in the Agora-Flutter-SDK
- Enable swift package manager support in the pubspec.yaml file
- Clean and rebuild
- Try and call engine.joinChannelWithUserAccount(...)
Expected results
joinChannelWithUserAccount does not throw exceptions when provided valid arguments.
Actual results
joinChannelWithUserAccount will always throw RTC error -2 on macOS but works with the same arguments on Android.
If you disable SPM and try the exact same process it works on macOS.
Code sample
Set you yaml like this
Code sample
flutter:
config:
enable-swift-package-manager: true
I beleive this is because for the 6.5.3 and 6.6.2 release the Package.swift files were NOT updated to use the new versions of the AgoraRtcEngine_macOS and AgoraRtcWrapper when compared to the cocoapods files. Manually updating these files to their correct version seems to resolve this issue.
This issue may also be affecting iOS as that Package.swift file also hasn't been updated in 9 months.
Screenshots or Video
Screenshots / Video demonstration
Logs
Logs
Flutter Doctor output
Doctor output
<my computer> ios % flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.38.10, on macOS 26.3 25D125 darwin-arm64, locale
en-US)
[✓] Android toolchain - develop for Android devices (Android SDK version
36.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 26.2)
[✓] Chrome - develop for the web
[✓] Connected device (3 available)
[✓] Network resources
• No issues found!
<my computer> ios %
Version of the agora_rtc_engine
6.5.3, 6.6.2
Platforms affected
Steps to reproduce
Expected results
joinChannelWithUserAccount does not throw exceptions when provided valid arguments.
Actual results
joinChannelWithUserAccount will always throw RTC error -2 on macOS but works with the same arguments on Android.
If you disable SPM and try the exact same process it works on macOS.
Code sample
Set you yaml like this
Code sample
I beleive this is because for the 6.5.3 and 6.6.2 release the Package.swift files were NOT updated to use the new versions of the AgoraRtcEngine_macOS and AgoraRtcWrapper when compared to the cocoapods files. Manually updating these files to their correct version seems to resolve this issue.
This issue may also be affecting iOS as that Package.swift file also hasn't been updated in 9 months.
Screenshots or Video
Screenshots / Video demonstration
Logs
Logs
Flutter Doctor output
Doctor output