从Xcode 14 Release Notes可以看到,目前最低支持版本已经提到了 iOS11,并且自然而然的移除了无法升级到 iOS11 的armv7, armv7s, and i386。
这导致了我们打包遇到的第一个问题:架构报错。
error: The armv7 architecture is deprecated. You should update your ARCHS build setting to remove the armv7 architecture. (in target 'Pods-packager' from project 'Pods')
error: The armv7s architecture is deprecated. You should update your ARCHS build setting to remove the armv7s architecture. (in target 'Pods-packager' from project 'Pods')
通过修改Cocoapod Package中的builder.rb
的 ARCHS 为 $(ARCHS_STANDARD)
修改后为。
def ios_build_options
"ARCHS=\'$(ARCHS_STANDARD)\' OTHER_CFLAGS=\'-fembed-bitcode -Qunused-arguments'"
end
builder.rb可以根据自己安装的位置找到。这个根据自己安装的ruby版本来确定。
同时修改pod_utils.rb
文件 文章来源:https://www.toymoban.com/news/detail-522246.html
unless static_installer.nil?
static_installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['CLANG_MODULES_AUTOLINK'] = 'NO'
config.build_settings['GCC_GENERATE_DEBUGGING_SYMBOLS'] = 'NO'
config.build_settings['EXCLUDED_ARCHS[sdk=iphonesimulator*]'] = 'arm64', 'i386' // <-- inserted here
config.build_settings['EXCLUDED_ARCHS[sdk=iphoneos*]'] = 'armv7s', 'armv7' // <-- inserted here
end
end
static_installer.pods_project.save
end
保存后重新使用 Cocoapod Package。文章来源地址https://www.toymoban.com/news/detail-522246.html
到了这里,关于Cocoapod Package Xcode14适配问题的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!