Skip to content

Build fails on iOS and macOS when SPM is enabled #1328

Closed

Description

@OutdatedGuy

pubspec.yaml:

dependencies:
  stream_video: ^1.5.0

flutter:
  config:
    enable-swift-package-manager: true

Steps to Reproduce

  1. Run the example app of stream_video with SPM enabled
  2. Check build error regarding dependency resolution
    xcodebuild: error: Could not resolve package dependencies:
      Failed to resolve dependencies Dependencies could not be resolved because no versions of 'stream-video-swift-webrtc' match the requirement 145.17.0 and 'stream_webrtc_flutter-3.2.0' depends on 'stream-video-swift-webrtc' 145.17.0.
    

Activity

  1. self-assigned this
    on Sep 8, 2026
  2. Brazol commented on Sep 8, 2026

    @Brazol
    Contributor

    Hi, thanks for the report. That version is published and fine on our side. I verified 145.17.0 exists on the public repo and resolves cleanly from a completely cold cache. Please clear the SPM caches via Xcode (File → Packages → Reset Package Caches) and try again.

  3. OutdatedGuy commented on Sep 8, 2026

    @OutdatedGuy
    ContributorAuthor

    Hi @Brazol, I'm unable to clear SPM cache in XCode, the options are disabled (see attached screenshot)
    Image

    Further, I asked AI on how to resolve it differently and even after following bunch of steps (clearing swiftpm cache using cli, clearing all build directories, removing DerivedData, etc) I still am facing the same issue.

  4. renefloor commented on Sep 9, 2026

    @renefloor
    Contributor

    @OutdatedGuy can you look at ~/Library/Caches/org.swift.swiftpm and open that with xcode. It should look something like the image below. I wonder if stream-video-swift-webrtc is there and if it is, can you delete it? After deleting you should run flutter clean before flutter pub get and flutter run.

    Image
  5. OutdatedGuy commented on Sep 9, 2026

    @OutdatedGuy
    ContributorAuthor

    Yes it was present there, I tried deleting it and followed your steps still no result. I even deleted the whole cache with:

    rm -rf ~/Library/Caches/org.swift.swiftpm
    rm -rf ~/Library/Caches/com.apple.dt.Xcode/SwiftPM
    rm -rf ~/Library/Developer/Xcode/DerivedData

    and then ran:

    cd ios
    rm -rf .build/
    rm -f Package.resolved
    rm -rf Pods/ Podfile.lock
    cd ..
    flutter clean
    flutter pub get

    still same issue.


    I cloned the https://github.com/GetStream/webrtc-flutter repo locally and updated Package.swift inside both ios and macos directories to use commit hash instead of tag with below changes:

        dependencies: [
            .package(name: "FlutterFramework", path: "../FlutterFramework"),
            .package(
    -           url: "https://github.com/GetStream/stream-video-swift-webrtc.git", exact: "145.17.0"
    +           url: "https://github.com/GetStream/stream-video-swift-webrtc.git", .revision("61cd264753ddf22e175e2537369c3173c471c5a3")
            )
        ],
    

    then override the package in pubspec.yaml like this:

    dependency_overrides:
      stream_webrtc_flutter:
        path: "/path/to/local/webrtc-flutter"
    

    and the issue resolved with stream_webrtc_flutter but same issue occurred with firebase-ios-sdk. So, I don't think it's a stream_webrtc_flutter issue but rather a SPM / XCode / Flutter issue.

  6. renefloor commented on Oct 20, 2026

    @renefloor
    Contributor

    We're closing this ticket as the issue seems not related to stream-video. If it's somehow solved in the flutter SDK, but still an issue only with our package feel free to re-open.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions