【问题标题】:Flutter Plugin Development native vendored_frameworks file not found未找到 Flutter 插件开发原生 vendored_frameworks 文件
【发布时间】:2020-05-15 09:59:15
【问题描述】:

我正在开发适用于 iOS 的 flutter-webrtc 插件。以前,该插件使用预构建的 cocoapods 依赖项。但是,他们在WebRTC M80 Release Notes 中声明他们将弃用移动库。

要及时了解最新的 iOS 原生 WebRTC 错误修复和功能,我们现在需要build from source

我是从源代码构建的,我正在使用 WebRTC 的 AppRTCMobile 示例应用程序对其进行测试,它正在那里工作。现在我正在尝试将WebRTC.framework 导入到颤振插件中,但遇到了麻烦。

没有关于此的颤振文档,但我遵循了 this github issue 的指导。我已将从源代码构建的二进制文件复制到 plugin ios directory 并修改 flutter_webrtc.podspec 以包含框架,但出现错误:

Xcode's output:
↳
    In file included from /Users/corey/Workspace/flutter/flutter-webrtc/ios/Classes/FlutterWebRTCPlugin.m:1:
    /Users/corey/Workspace/flutter/flutter-webrtc/ios/Classes/FlutterWebRTCPlugin.h:4:9: fatal error: 'WebRTC/RTCDataChannel.h' file not found
    #import <WebRTC/RTCDataChannel.h>
            ^~~~~~~~~~~~~~~~~~~~~~~~~
    1 error generated.
    In file included from /Users/corey/Workspace/flutter/flutter-webrtc/ios/Classes/FlutterRTCVideoRenderer.m:1:
    In file included from /Users/corey/Workspace/flutter/flutter-webrtc/ios/Classes/FlutterRTCVideoRenderer.h:1:
    /Users/corey/Workspace/flutter/flutter-webrtc/ios/Classes/FlutterWebRTCPlugin.h:4:9: fatal error: 'WebRTC/RTCDataChannel.h' file not found
    #import <WebRTC/RTCDataChannel.h>
            ^~~~~~~~~~~~~~~~~~~~~~~~~
    1 error generated.
    note: Using new build system
    note: Planning build
    note: Constructing build description

我对颤振插件开发真的很陌生,所以我不确定我是否正确地做这件事。任何提示将不胜感激!

【问题讨论】:

    标签: ios flutter webrtc flutter-plugin webrtc-ios


    【解决方案1】:

    将二进制文件添加到插件ios目录后,我需要手动进入我的应用程序的ios目录(应用程序取决于插件)并手动运行pod install &amp;&amp; pod update

    在那之后,插件导入错误得到了修复,我现在正在使用从 Flutter-webrtc 插件中的源代码构建的 WebRTC :)

    【讨论】:

      猜你喜欢
      • 2018-12-05
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-11-19
      • 2020-07-27
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多