【问题标题】:Flutter using jitsi_meet flutter package generate error on IOSFlutter 使用 jitsi_meet flutter 包在 IOS 上生成错误
【发布时间】:2022-01-06 09:12:18
【问题描述】:

我正在尝试创建一个颤振应用程序并集成 jitsi_meet 颤振包,我按照文档中的说明进行操作。

我的flutter版本和IOS via 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

我的播客文件

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 上构建。

【问题讨论】:

  • 在 flutter 中使用 pod install 。然后在 xcode 中运行
  • 你好运气好,面临同样的问题
  • @Tasnuvaoshin 是的,我在 Xcode 上也犯了同样的错误
  • @shubhamsachan 目前没有运气

标签: flutter jitsi jitsi-meet


【解决方案1】:

我通过在我的 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

然后运行flutter clean + flutter pub getcd ios 并运行pod install 现在你会遇到一个新问题Xcode 11.2.1 error: Command CompileSwiftSources failed with a nonzero exit code 所以我按照这个问题的解决方案Xcode 11.2.1 error: Command CompileSwiftSources failed with a nonzero exit code

在 Xcode 上打开 ios 文件夹后,将 Build Options -> Build Libraries 更改为 Distribution in the targets Build Settings to No。然后在 ios 文件夹中运行flutter run,构建成功,希望对遇到同样问题的人有所帮助。

【讨论】:

    猜你喜欢
    • 2021-04-28
    • 2021-09-29
    • 2021-01-15
    • 1970-01-01
    • 2021-12-08
    • 2019-05-29
    • 2021-08-26
    • 2021-03-06
    • 2020-03-07
    相关资源
    最近更新 更多