未找到Flutter插件开发本机vendored_frameworks文件

问题描述 投票:0回答:1

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

为了及时了解最新的iOS本机WebRTC错误修正和功能,我们现在需要build from source

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

没有关于抖动的文档,但是我遵循了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

我真的是Flutter插件开发的新手,所以不确定我是否正确执行了此操作。任何提示将不胜感激!

ios flutter webrtc flutter-plugin webrtc-ios
1个回答
0
投票

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

此后,插件导入错误已修复,我现在正在使用从flutter-webrtc插件中的源构建的WebRTC:)

© www.soinside.com 2019 - 2024. All rights reserved.