我正在尝试创建一个 flutter 应用程序并集成 jitsi_meet flutter 包,我按照文档中指示的说明进行操作。
我的 flutter 版本和 IOS 通过 flutter doctor
Flutter version 2.8.1
develop for iOS and macOS (Xcode 13.1)
我的配置 pubspec.yaml
dependencies:
flutter:
sdk: flutter
jitsi_meet: ^4.0.0
我的 Podfile
platform :ios, '11.0'
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['ENABLE_BITCODE'] = 'NO'
end
end
end
在我的 pslist 上添加了以下键/字符串
<key>NSCameraUsageDescription</key>
<string>$(PRODUCT_NAME) MyApp needs access to your camera for meetings.</string>
<key>NSMicrophoneUsageDescription</key>
<string>$(PRODUCT_NAME) MyApp needs access to your microphone for meetings.</string>
在此配置之后,我还将部署构建更改为 ios 11,如其他解决方案所述,但在使用我的运行构建之后simulator iPhone 13
出现以下错误
Failed to build iOS app
Error output from Xcode build:
↳
** BUILD FAILED **
Xcode's output:
↳
<module-includes>:1:9: note: in file included from <module-includes>:1:
#import "Headers/jitsi_meet-umbrella.h"
^
/Users/kaori/Documents/development/projects/fluttermeet/ios/Pods/Target Support Files/jitsi_meet/jitsi_meet-umbrella.h:13:9: note: in file included from /Users/kaori/Documents/development/projects/fluttermeet/ios/Pods/Target Support Files/jitsi_meet/jitsi_meet-umbrella.h:13:
#import "JitsiMeetPlugin.h"
^
无法让它在 ios 上构建。
我通过在 podfile 上添加以下行来构建它
platform :ios, '11.0'
....
post_install do |installer|
installer.pods_project.targets.each do |target|
flutter_additional_ios_build_settings(target)
# Required by jitsi
target.build_configurations.each do |config|
config.build_settings['ENABLE_BITCODE'] = 'NO'
config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64"
end
end
end
and run flutter clean
+ flutter pub get
and cd ios
并运行pod install
现在你会遇到一个新问题Xcode 11.2.1 error: Command CompileSwiftSources failed with a nonzero exit code
所以我遵循了这个问题的解决方案Xcode 11.2.1 错误:命令 CompileSwiftSources 失败,退出代码非零 https://stackoverflow.com/questions/59192371/xcode-11-2-1-error-command-compileswiftsources-failed-with-a-nonzero-exit-code
在 Xcode 上打开 ios 文件夹并更改Build Options
-> Build Libraries
for Distribution in the targets Build Settings to No
。然后运行flutter run
在 ios 文件夹中,构建成功,希望这对遇到相同问题的人有所帮助。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)