ConnectyCube / connectycube-flutter-samples

Code samples for Flutter, based on ConnectyCube platform
https://developers.connectycube.com/flutter/
Apache License 2.0
85 stars 91 forks source link

[iOS] p2p_call_sample won't build using latest Flutter #343

Open sheidenn opened 6 months ago

sheidenn commented 6 months ago

Hi @TatankaConCube

Currently, our company is using a competitive product that implements WebRTC; however, we've encountered significant functionality issues, and unfortunately, their support team has been unable to provide adequate assistance in resolving these issues.

Due to these persistent challenges, we are eager to transition to ConnectyCube. I have attempted to build a sample application, but it appears incompatible with the latest version of Flutter. While I understand that an older version may function properly, I am keen on maintaining consistency between the sample and our application. This ensures a 1:1 correlation, which is crucial for effectively debugging any potential issues.

Could you kindly assist us in resolving this matter by ensuring compatibility with the latest version of Flutter? 🙏

Specify the sample to which the issue belongs (use [x]): [x] P2P Calls sample

Platform (use [x]) [x] iOS

Device info Model: iPhone Xs OS version: 17.2

Describe the bug: I try to build the iOS sample app using the latest Flutter version

Steps to Reproduce:

  1. flutter pub get
  2. flutter build ios

Logs:

First, I got this error:

Running pod install...

[!] CocoaPods could not find compatible versions for pod "WebRTC-SDK":
      In snapshot (Podfile.lock):
        WebRTC-SDK (= 114.5735.02)

      In Podfile:
        flutter_webrtc (from `.symlinks/plugins/flutter_webrtc/ios`) was resolved to 0.9.36, which depends on
          WebRTC-SDK (= 114.5735.08)

    You have either:
     * out-of-date source repos which you can update with `pod repo update` or with `pod install --repo-update`.
     * changed the constraints of dependency `WebRTC-SDK` inside your development pod `flutter_webrtc`.
       You should run `pod update WebRTC-SDK` to apply changes you've made.

    /opt/homebrew/Cellar/cocoapods/1.14.3/libexec/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:317:in `raise_error_unless_state'
    /opt/homebrew/Cellar/cocoapods/1.14.3/libexec/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:299:in `block in unwind_for_conflict'
    <internal:kernel>:90:in `tap'
    /opt/homebrew/Cellar/cocoapods/1.14.3/libexec/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:297:in `unwind_for_conflict'
    /opt/homebrew/Cellar/cocoapods/1.14.3/libexec/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:257:in `process_topmost_state'
    /opt/homebrew/Cellar/cocoapods/1.14.3/libexec/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:182:in `resolve'
    /opt/homebrew/Cellar/cocoapods/1.14.3/libexec/gems/molinillo-0.8.0/lib/molinillo/resolver.rb:43:in `resolve'
    /opt/homebrew/Cellar/cocoapods/1.14.3/libexec/gems/cocoapods-1.14.3/lib/cocoapods/resolver.rb:94:in `resolve'
    /opt/homebrew/Cellar/cocoapods/1.14.3/libexec/gems/cocoapods-1.14.3/lib/cocoapods/installer/analyzer.rb:1082:in `block in resolve_dependencies'
    /opt/homebrew/Cellar/cocoapods/1.14.3/libexec/gems/cocoapods-1.14.3/lib/cocoapods/user_interface.rb:64:in `section'
    /opt/homebrew/Cellar/cocoapods/1.14.3/libexec/gems/cocoapods-1.14.3/lib/cocoapods/installer/analyzer.rb:1080:in `resolve_dependencies'
    /opt/homebrew/Cellar/cocoapods/1.14.3/libexec/gems/cocoapods-1.14.3/lib/cocoapods/installer/analyzer.rb:125:in `analyze'
    /opt/homebrew/Cellar/cocoapods/1.14.3/libexec/gems/cocoapods-1.14.3/lib/cocoapods/installer.rb:422:in `analyze'
    /opt/homebrew/Cellar/cocoapods/1.14.3/libexec/gems/cocoapods-1.14.3/lib/cocoapods/installer.rb:244:in `block in resolve_dependencies'
    /opt/homebrew/Cellar/cocoapods/1.14.3/libexec/gems/cocoapods-1.14.3/lib/cocoapods/user_interface.rb:64:in `section'
    /opt/homebrew/Cellar/cocoapods/1.14.3/libexec/gems/cocoapods-1.14.3/lib/cocoapods/installer.rb:243:in `resolve_dependencies'
    /opt/homebrew/Cellar/cocoapods/1.14.3/libexec/gems/cocoapods-1.14.3/lib/cocoapods/installer.rb:162:in `install!'
    /opt/homebrew/Cellar/cocoapods/1.14.3/libexec/gems/cocoapods-1.14.3/lib/cocoapods/command/install.rb:52:in `run'
    /opt/homebrew/Cellar/cocoapods/1.14.3/libexec/gems/claide-1.1.0/lib/claide/command.rb:334:in `run'
    /opt/homebrew/Cellar/cocoapods/1.14.3/libexec/gems/cocoapods-1.14.3/lib/cocoapods/command.rb:52:in `run'
    /opt/homebrew/Cellar/cocoapods/1.14.3/libexec/gems/cocoapods-1.14.3/bin/pod:55:in `<top (required)>'
    /opt/homebrew/Cellar/cocoapods/1.14.3/libexec/bin/pod:25:in `load'
    /opt/homebrew/Cellar/cocoapods/1.14.3/libexec/bin/pod:25:in `<main>'

Error: CocoaPods's specs repository is too out-of-date to satisfy dependencies.
To update the CocoaPods specs, run:
  pod repo update

Error running pod install

So, I tried pod update WebRTC-SDK

that executes without an error but the problem is this:

error: Missing concrete implementations of 'RTCSessionStateCallback.onConnectingToUser' and 'RTCSessionStateCallback.onConnectionFailedWithUser'. (non_abstract_class_inherits_abstract_member at [p2p_call_sample] lib/src/conversation_screen.dart:26)

So it seems that the old version of webRTC pod can't be installed and the latest version is not compatible with the codebase?

Actual result: Pods fail to install and the app won't build.

Expected behavior: Pods are installed based on the provided Podfile and the app is built successfully.

Additional info flutter doctor:

[✓] Flutter (Channel stable, 3.19.1, on macOS 14.2 23C64 darwin-arm64)
[✓] Xcode - develop for iOS and macOS (Xcode 15.2)

dart --version:

Dart SDK version: 3.3.0 (stable) (Tue Feb 13 10:25:19 2024 +0000) on "macos_arm64"
TatankaConCube commented 6 months ago

have you tried to update the base of the dependencies repo by the pod repo update command?

anyway, we have prepared the new version of our SDK with the update of all possible dependencies to the latest versions, and will publish it later today

TatankaConCube commented 6 months ago

also you can check if have you used the latest version of our SDK. for now it is the 2.11.2

sheidenn commented 6 months ago

@TatankaConCube

Thank you for taking a look - I really appreciate it!

Amazing, I'm looking forward to try the new version!

Thanks

TatankaConCube commented 6 months ago

the new version 2.11.3 was published. please try to use it. don't forget to do flutter clean, flutter pub get then navigate to the ios directory cd ios and perform pod update and try to build an iOS app