当我使用 14 作为目标时,Xcode 停留在编译 ios 版本 11 上

ari*_*xis 5 xcode ios swift flutter

我在这里缺少什么?没有地方可以为 ios 11 编译的指令..

Swift 编译器错误 (Xcode):针对 iOS 11.0 进行编译,但模块“PhoneNumberKit”的最低部署目标为 iOS 12.0:/Users/aris/Library/Developer/Xcode/DerivedData/Runner-cmtnerpxiupormgiakqsqxlnezts/Build/Intermediates.noindex/ArchiveIntermediates /Runner/Build ProductsPath/Release-iphoneos/PhoneNumberKit/PhoneNumberKit.framework/Modules/PhoneNumberKit.swiftmodule/arm64-apple-ios.swiftmodule /Users/aris/.pub-cache/hosted/pub.dev/libphonenumber_plugin-0.3.2 /ios/Classes/SwiftLibphonenumberPlugin.swift:2:7

我尝试过的事情:

  1. 从 Xcode 中清除构建文件夹并再次运行 pod install
  2. pod install --repo-update
  3. Podfile 将第一行作为目标 ios: 14
  4. Xcode 目标 -> 运行程序 -> 构建设置 -> ios 构建目标 14
  5. 扑扑干净;扑扑哈巴狗得到;颤动构建ipa
  6. flutter 升级并重新安装所有 pod
  7. 删除Xcode的派生文件夹

T.C*_*kis 8

我在使用 PhoneNumberKit 时遇到了这个确切的错误:

无法为设备构建预编译应用程序。Swift 编译器错误 (Xcode):针对 iOS 11.0 进行编译,但模块“PhoneNumberKit”的最低部署目标为 iOS 12.0:

更新您的ios/Podfile

post_install do |installer|
  installer.pods_project.targets.each do |target|
    target.build_configurations.each do |config|
      # Do either this:
      config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '14.0'
      # or this:
      config.build_settings.delete 'IPHONEOS_DEPLOYMENT_TARGET'
    end
  end
end
Run Code Online (Sandbox Code Playgroud)

感谢/sf/answers/4485305681//sf/answers/4485053681/