【问题标题】:Flutter and Firebase for iOS 11适用于 iOS 11 的 Flutter 和 Firebase
【发布时间】:2022-01-25 07:48:03
【问题描述】:

我正在尝试在 Flutter 中安装 jitsi_meet,但我需要将最低 ios 版本更改为 11。设置为 iOS 10 时一切正常,但是当我将 iOS 版本更改为 11 时,我收到错误消息运行 pod install 时如下所示。我想知道我可以更新或更改什么以允许 Firebase 与 iOS 11 一起使用 Flutter。

pod 安装错误信息:

firebase_analytics: Using Firebase SDK version '8.9.0' defined in 'firebase_core'
firebase_auth: Using Firebase SDK version '8.9.0' defined in 'firebase_core'
firebase_core: Using Firebase SDK version '8.9.0' defined in 'firebase_core'
firebase_database: Using Firebase SDK version '8.9.0' defined in 'firebase_core'
[!] CocoaPods could not find compatible versions for pod "Google-Mobile-Ads-SDK":
  In Podfile:
    appodeal_flutter (from `.symlinks/plugins/appodeal_flutter/ios`) was resolved to 1.1.1, which depends on
      APDGoogleAdMobAdapter (= 2.10.2.2) was resolved to 2.10.2.2, which depends on
        Google-Mobile-Ads-SDK (~> 8.9.0)

    google_mobile_ads (from `.symlinks/plugins/google_mobile_ads/ios`) was resolved to 0.0.1, which depends on
      Google-Mobile-Ads-SDK (= 8.11.0)

CocoaPods could not find compatible versions for pod "smaato-ios-sdk":
  In Podfile:
    appodeal_flutter (from `.symlinks/plugins/appodeal_flutter/ios`) was resolved to 1.1.1, which depends on
      APDBidMachineAdapter (= 2.10.2.2) was resolved to 2.10.2.2, which depends on
        APDBidMachineAdapter/HeaderBidding (= 2.10.2.2) was resolved to 2.10.2.2, which depends on
          APDBidMachineAdapter/Smaato (= 2.10.2.2) was resolved to 2.10.2.2, which depends on
            smaato-ios-sdk (= 21.6.13)

    appodeal_flutter (from `.symlinks/plugins/appodeal_flutter/ios`) was resolved to 1.1.1, which depends on
      APDSmaatoAdapter (= 2.10.2.1) was resolved to 2.10.2.1, which depends on
        smaato-ios-sdk (~> 21.6.13)

这是我的 pod 文件:

platform :ios, '11.0'

# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'

project 'Runner', {
  'Debug' => :debug,
  'Profile' => :release,
  'Release' => :release,
}

def flutter_root
  generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
  unless File.exist?(generated_xcode_build_settings_path)
    raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
  end

  File.foreach(generated_xcode_build_settings_path) do |line|
    matches = line.match(/FLUTTER_ROOT\=(.*)/)
    return matches[1].strip if matches
  end
  raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"
end

require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)

flutter_ios_podfile_setup

target 'Runner' do
  use_frameworks!
  use_modular_headers!

  flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))

end


post_install do |installer|
  installer.pods_project.targets.each do |target|
    flutter_additional_ios_build_settings(target)
    target.build_configurations.each do |config|
      config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '9.0'
    end
  end
end

这是我的 pubspec.yaml 中的一个 sn-p


environment:
  sdk: ">=2.7.0 <3.0.0"

dependencies:
  flutter:
    sdk: flutter
  firebase_core: ^1.1.0
  firebase_database: ^7.1.2
  geolocator: ^7.0.3
  profanity_filter: ^2.0.0
  #firebase_database: ^6.1.2

#  firebase_core: ^0.3.4
#  firebase_database: ^2.0.3

  # The following adds the Cupertino Icons font to your application.
  # Use with the CupertinoIcons class for iOS style icons.
  cupertino_icons: ^1.0.0
  english_words: ^4.0.0-0
  google_mobile_ads: ^0.13.3
  in_app_purchase: ^1.0.0
  flutter_colorpicker: ^0.5.0
  shared_preferences: ^2.0.5
  flutter_inapp_purchase: ^5.0.1
  form_validator: ^0.1.7
  wc_form_validators: ^1.0.0
  rflutter_alert: ^2.0.2
  firebase_auth: ^3.0.1
  get_storage: ^2.0.2
  flutter_linkify: ^5.0.2
  url_launcher: ^6.0.5
  bad_words: ^0.2.2
  carousel_slider: ^4.0.0
  intro_slider: ^3.0.2
  intl: ^0.17.0
  sizer: ^2.0.13
  appodeal_flutter: ^1.0.1
  flutter_launcher_icons: ^0.9.1
  firebase_analytics: ^8.3.1
  jitsi_meet: ^4.0.0
  bspoke_jitsi_web_plugin: ^0.0.4

【问题讨论】:

    标签: firebase flutter


    【解决方案1】:

    我重新安装了 cocoapods 并摆脱了 Appodeal 集成,现在一切正常。

    很遗憾,我找不到让 Jitsi 在与 Appodeal 相同的应用上工作的方法

    【讨论】:

    • Appodeal 似乎存在问题,需要特定次要版本的 Google-Mobile-Ads-SDK,而不是允许它浮动到次要版本更新。
    • 正如目前所写,您的答案尚不清楚。请edit 添加其他详细信息,以帮助其他人了解这如何解决所提出的问题。你可以找到更多关于如何写好答案的信息in the help center
    猜你喜欢
    • 2020-09-25
    • 2020-02-05
    • 2021-03-31
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-02-06
    • 2021-07-24
    • 2017-03-16
    相关资源
    最近更新 更多