簡體   English   中英

Flutter 使用 jitsi_meet flutter package 在 ZBA3F2ADEA47B86B0D408DE3F7E4D92 上生成錯誤

[英]Flutter using jitsi_meet flutter package generate error on IOS

我正在嘗試創建一個 flutter 應用程序並集成 jitsi_meet flutter package 我按照文檔中指示的說明進行操作。

我的 flutter 版本和 IOS 通過 flutter 醫生

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

我通過在我的 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:命令 CompileSwiftSources 失敗,退出代碼為非零

在 Xcode 上打開 ios 文件夾后,將目標 Build Settings 中的Build Options -> Build Libraries for Distribution in the targets Build Settings to No 然后在 ios 文件夾中運行flutter run ,構建成功,希望這對遇到同樣問題的人有所幫助。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM