ios - iOS 部署目标 'IPHONEOS_DEPLOYMENT_TARGET' 设置为 8.0,在 Flutter 中如何更改最小 IOS Deploying Target

标签 ios xcode flutter

我在项目中将所有内容都更改为 9.0,但我在很多 pod 中都遇到了同样的错误。
我尝试做很多不同的事情,但没有任何效果。有谁知道我该如何解决这个问题?

warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is
9.0 to 14.0.99. (in target 'gRPC-C++-gRPCCertificates-Cpp' from project 'Pods')
warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is
9.0 to 14.0.99. (in target 'GoogleAppMeasurement' from project 'Pods')
warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is
9.0 to 14.0.99. (in target 'FirebaseAuth' from project 'Pods')
warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is
9.0 to 14.0.99. (in target 'GoogleUtilities' from project 'Pods')
warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is
9.0 to 14.0.99. (in target 'vibration' from project 'Pods')
warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is
9.0 to 14.0.99. (in target 'nanopb' from project 'Pods')
warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is
9.0 to 14.0.99. (in target 'BoringSSL-GRPC' from project 'Pods')
warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is
9.0 to 14.0.99. (in target 'gRPC-Core' from project 'Pods')
warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is
9.0 to 14.0.99. (in target 'gRPC-C++' from project 'Pods')
为设备构建时遇到错误。

最佳答案

对我有用的是@raffaelli-l-c 和@arhan-reddy-busam 答案的组合。
确保执行以下操作:

  • 设置 MinimumOSVersionios/Flutter/AppFrameworkInfo.plist 中的 9.0
  • 确保取消注释 platform :ios, '9.0'ios/Podfile
  • 确保 ios/Podfile包含以下安装后脚本:
  •     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
    
    在进行生产构建时,以下例程对我有用:
        flutter clean \
            && rm ios/Podfile.lock pubspec.lock \
            && rm -rf ios/Pods ios/Runner.xcworkspace \
            && flutter build ios --build-name=1.0.0 --build-number=1 --release --dart-define=MY_APP_ENV=prod
    

    关于ios - iOS 部署目标 'IPHONEOS_DEPLOYMENT_TARGET' 设置为 8.0,在 Flutter 中如何更改最小 IOS Deploying Target,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63973136/

    相关文章:

    ios - 如何在 View 中垂直居中标签

    iphone - 如何获取iOS 6中用户的联系人列表?

    ios - SugarWod (iOS) 是否实现了自定义网址?

    ios - 解析 PFUser 是否下载所有用户对象列内容?

    flutter - 从另一个 dart 文件调用函数

    dart - 在flutter中分享图片+文字+网址的便捷方式

    ios - Swift 3 setter/getter 方法

    c++ - "Control may reach end of non-void function"警告

    ios - Xcode 存档太大

    flutter - 在 VS Code 中为 dart 禁用自动格式化