Skip to content

Swift Package Manager support is broken in 6.5.3 and 6.6.2 #2569

Description

@scott-macky-eb

Version of the agora_rtc_engine

6.5.3, 6.6.2

Platforms affected

  • Android
  • iOS
  • macOS
  • Windows
  • Web

Steps to reproduce

  1. Use the example project in the Agora-Flutter-SDK
  2. Enable swift package manager support in the pubspec.yaml file
  3. Clean and rebuild
  4. 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 %

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions