0

I am getting this build error for IOS, while integrating jitsi_meet 4.0.0 in a flutter. I am unable to run my application on simulator, as I am getting this PiPViewCoordinator error. Has anyone else faced issue before?

Xcode Build Error

     ** BUILD FAILED **
Xcode's output:
↳
    Writing result bundle at path:
        /var/folders/gp/6s965rts4v58r8yxc4cxd5800000gn/T/flutter_tools.fVaWqL/flutter_ios_build_temp_dirc1d2Np/temporary_xcresult_bundle
    Command CompileSwiftSources failed with a nonzero exit code
    error: emit-module command failed with exit code 1 (use -v to see invocation)
/Users/tusharasodariya/.pub-cache/hosted/pub.dartlang.org/jitsi_meet-4.0.0/ios/Classes/JitsiViewController.swift:8:41: error: cannot find type 'PiPViewCoordinator' in scope
        fileprivate var pipViewCoordinator: PiPViewCoordinator?
                                            ^~~~~~~~~~~~~~~~~~
    Command EmitSwiftModule failed with a nonzero exit code
/Users/tusharasodariya/.pub-cache/hosted/pub.dartlang.org/jitsi_meet-4.0.0/ios/Classes/JitsiViewController.swift:8:41: error: cannot find type 'PiPViewCoordinator' in scope
        fileprivate var pipViewCoordinator: PiPViewCoordinator?
                                            ^~~~~~~~~~~~~~~~~~
/Users/tusharasodariya/.pub-cache/hosted/pub.dartlang.org/jitsi_meet-4.0.0/ios/Classes/JitsiViewController.swift:87:30: error: cannot find 'PiPViewCoordinator' in scope
            pipViewCoordinator = PiPViewCoordinator(withView: jitsiMeetView)
                                 ^~~~~~~~~~~~~~~~~~
/Users/tusharasodariya/.pub-cache/hosted/pub.dartlang.org/jitsi_meet-4.0.0/ios/Classes/JitsiViewController.swift:102:30: error: 'nil' requires a contextual type
            pipViewCoordinator = nil
                                 ^
/Users/tusharasodariya/.pub-cache/hosted/pub.dartlang.org/jitsi_meet-4.0.0/ios/Classes/JitsiViewController.swift:8:41: error: cannot find type 'PiPViewCoordinator' in scope
        fileprivate var pipViewCoordinator: PiPViewCoordinator?
                                            ^~~~~~~~~~~~~~~~~~
/Users/tusharasodariya/.pub-cache/hosted/pub.dartlang.org/connectivity_plus-2.3.4/ios/Classes/PathMonitorConnectivityProvider.swift:31:5: warning: result of call to 'ensurePathMonitor()' is unused
        ensurePathMonitor()
        ^                ~~
/Users/tusharasodariya/.pub-cache/hosted/pub.dartlang.org/connectivity_plus-2.3.4/ios/Classes/PathMonitorConnectivityProvider.swift:35:5: warning: result of call to 'ensurePathMonitor()' is unused
        ensurePathMonitor()
        ^                ~~
/Users/tusharasodariya/.pub-cache/hosted/pub.dartlang.org/connectivity_plus-2.3.4/ios/Classes/ReachabilityConnectivityProvider.swift:23:5: warning: result of call to 'ensureReachability()' is unused
        ensureReachability()
        ^                 ~~
/Users/tusharasodariya/.pub-cache/hosted/pub.dartlang.org/connectivity_plus-2.3.4/ios/Classes/PathMonitorConnectivityProvider.swift:31:5: warning: result of call to 'ensurePathMonitor()' is unused
        ensurePathMonitor()
        ^                ~~
/Users/tusharasodariya/.pub-cache/hosted/pub.dartlang.org/connectivity_plus-2.3.4/ios/Classes/PathMonitorConnectivityProvider.swift:35:5: warning: result of call to 'ensurePathMonitor()' is unused
        ensurePathMonitor()
        ^                ~~
/Users/tusharasodariya/.pub-cache/hosted/pub.dartlang.org/connectivity_plus-2.3.4/ios/Classes/ReachabilityConnectivityProvider.swift:23:5: warning: result of call to 'ensureReachability()' is unused
        ensureReachability()
        ^                 ~~

    Command CompileSwiftSources failed with a nonzero exit code
    note: Using new build system
    note: Planning
    note: Build preparation complete
    note: Building targets in dependency order
    /Users/tusharasodariya/git-projects/meet-app/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 15.5.99. (in target 'ReachabilitySwift' from project 'Pods')
    /Users/tusharasodariya/git-projects/meet-app/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 15.5.99. (in target 'FMDB' from project 'Pods')
    Result bundle written to path:
        /var/folders/gp/6s965rts4v58r8yxc4cxd5800000gn/T/flutter_tools.fVaWqL/flutter_ios_build_temp_dirc1d2Np/temporary_xcresult_bundle
Uncategorized (Xcode): Command CompileSwiftSources failed with a nonzero exit code

Uncategorized (Xcode): Command EmitSwiftModule failed with a nonzero exit code

Swift Compiler Error (Xcode): Cannot find type 'PiPViewCoordinator' in scope
/Users/tusharasodariya/.pub-cache/hosted/pub.dartlang.org/jitsi_meet-4.0.0/ios/Classes/JitsiViewController.swift:7:40

Swift Compiler Error (Xcode): Cannot find 'PiPViewCoordinator' in scope
/Users/tusharasodariya/.pub-cache/hosted/pub.dartlang.org/jitsi_meet-4.0.0/ios/Classes/JitsiViewController.swift:86:29

Swift Compiler Error (Xcode): 'nil' requires a contextual type
/Users/tusharasodariya/.pub-cache/hosted/pub.dartlang.org/jitsi_meet-4.0.0/ios/Classes/JitsiViewController.swift:101:29


Could not build the application for the simulator.
Error launching application on iPhone 13 Pro.

Flutter doctor -v

[✓] Flutter (Channel stable, 3.0.2, on macOS 12.4 21F79 darwin-arm, locale en-IN)
    • Flutter version 3.0.2 at /Users/tusharasodariya/fvm/versions/3.0.2
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision cd41fdd495 (5 weeks ago), 2022-06-08 09:52:13 -0700
    • Engine revision f15f824b57
    • Dart version 2.17.3
    • DevTools version 2.12.2

[!] Android toolchain - develop for Android devices (Android SDK version 32.1.0-rc1)
    • Android SDK at /Users/tusharasodariya/Library/Android/sdk
    • Platform android-32, build-tools 32.1.0-rc1
    • ANDROID_HOME = /Users/tusharasodariya/Library/Android/sdk
    • Java binary at: /Users/tusharasodariya/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/212.5712.43.2112.8512546/Android Studio.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840)
    ! Some Android licenses not accepted.  To resolve this, run: flutter doctor --android-licenses

[✓] Xcode - develop for iOS and macOS (Xcode 13.4.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • CocoaPods version 1.11.3

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2021.2)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
       https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
       https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840)

[✓] Android Studio (version 2021.2)
    • Android Studio at /Users/tusharasodariya/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/212.5712.43.2112.8512546/Android Studio.app/Contents
    • Flutter plugin can be installed from:
       https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
       https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840)

[✓] VS Code (version 1.68.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.44.0

[✓] Connected device (4 available)
    • sdk gphone64 arm64 (mobile) • emulator-5554                        • android-arm64  • Android 12 (API 32) (emulator)
    • iPhone 13 Pro (mobile)      • 0FEE892A-E5DA-4405-BF13-B4103851E293 • ios            • com.apple.CoreSimulator.SimRuntime.iOS-15-5 (simulator)
    • macOS (desktop)             • macos                                • darwin-arm64   • macOS 12.4 21F79 darwin-arm
    • Chrome (web)                • chrome                               • web-javascript • Google Chrome 103.0.5060.114

[✓] HTTP Host Availability
    • All required HTTP hosts are available

! Doctor found issues in 1 category.

Any solutions?

Tushar Asodariya
  • 629
  • 2
  • 7
  • 20

1 Answers1

0

Add this line in Podfile

post_install do |installer| 

installer.pods_project.targets.each do |target|
flutter_additional_ios_build_settings(target)
    target.build_configurations.each do |config|
      config.build_settings['ENABLE_BITCODE'] = 'NO'
      config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64"
       end
   end
 end

I managed to get it running again with the following steps:

  • flutter clean
  • pod repo update
  • cd ios
  • rm -rf Podfile.lock Pods/
  • cd ..
  • rm -rf pubspec.lock .packages .flutter-plungins
  • flutter pub cache repair
  • flutter packages get
  • cd ios
  • pod install

and finally starting the app from xcode