Xcode 14.3 编译报错解决办法

1,004 阅读1分钟

来自苹果开发者社区的解答

developer.apple.com/forums/thre…

image.png

image.png

原因:Xcode 14.3 中移除了系统的一个ARC相关的库,支持的最低版本是iOS11

解决:

  1. 将项目的最低版本设置为iOS11,包括你自己的pod的私有库
  2. 在podfile 中添加脚本设置其他三方库最低版本为 iOS 11
post_install do |installer|
  installer.generated_projects.each do |project|
    project.targets.each do |target|
        target.build_configurations.each do |config|
            config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '14.0'
         end
    end
  end
end