我正在为 iOS开发 Flutter-webrtc插件。以前,该插件使用预构建的 cocoapods 依赖项。但是,在WebRTC M80 发行说明中,他们声明他们将弃用移动库。
为了及时了解最新的 iOS 原生 WebRTC 错误修复和功能,我们现在需要从源代码构建。
我是从源代码构建的,并且正在使用 WebRTC 的 AppRTCMobile 示例应用程序对其进行测试,并且它正在那里工作。现在我正在尝试将其导入WebRTC.framework
到颤振插件中,但遇到了麻烦。
没有关于这方面的颤振文档,但我遵循了这个 github 问题的指导。我已将从源代码构建的二进制文件复制到插件 ios 目录中,并修改了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
我对颤振插件开发真的很陌生,所以我不确定我是否正确地做这件事。任何提示将不胜感激!