[英]Flutter using jitsi_meet flutter package generate error on IOS
I am attempting to create a flutter app and integrate the jitsi_meet flutter package i followed the instructions indicated on documentation.我正在尝试创建一个 flutter 应用程序并集成 jitsi_meet flutter package 我按照文档中指示的说明进行操作。
My flutter version and IOS via flutter doctor我的 flutter 版本和 IOS 通过 flutter 医生
Flutter version 2.8.1
develop for iOS and macOS (Xcode 13.1)
My configuration pubspec.yaml我的配置 pubspec.yaml
dependencies:
flutter:
sdk: flutter
jitsi_meet: ^4.0.0
My 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
Added below keys/string on my pslist在我的 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>
After this configuration i also change the deployment build to ios 11 as stated from other solutions but after running build using my simulator iPhone 13
below error occur在此配置之后,我还将部署构建更改为 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"
^
Cannot get it to build on ios.无法让它在 ios 上构建。
I got it to build by adding below lines on my podfile我通过在我的 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
and run pod install
now you will encounter a new problem Xcode 11.2.1 error: Command CompileSwiftSources failed with a nonzero exit code
so i followed the solution from this question Xcode 11.2.1 error: Command CompileSwiftSources failed with a nonzero exit code and run
flutter clean
+ flutter pub get
and cd ios
and run pod install
now you will encounter a new problem Xcode 11.2.1 error: Command CompileSwiftSources failed with a nonzero exit code
so i followed the solution from this question Xcode 11.2.1 error:命令 CompileSwiftSources 失败,退出代码为非零
After opening ios folder on Xcode and change the Build Options
-> Build Libraries
for Distribution in the targets Build Settings to No
.在 Xcode 上打开 ios 文件夹后,将目标 Build Settings 中的
Build Options
-> Build Libraries
for Distribution in the targets Build Settings to No
。 And then run flutter run
inside ios folder and the build was successful, hope this help anyone who encounter the same issue.然后在 ios 文件夹中运行
flutter run
,构建成功,希望这对遇到同样问题的人有所帮助。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.