# Uncomment the next line to define a global platform for your project
platform :ios, '16.0' # 设置全局最低版本为 16.0
source ‘https://mirrors.tuna.tsinghua.edu.cn/git/CocoaPods/Specs.git’
target 'xxxxx' do
# Comment the next line if you don't want to use dynamic frameworks
use_frameworks!
pod 'ZFPlayer'
pod 'ZFPlayer/AVPlayer'
end
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64"
xcconfig_path = config.base_configuration_reference.real_path
xcconfig = File.read(xcconfig_path)
xcconfig_mod = xcconfig.gsub(/DT_TOOLCHAIN_DIR/, "TOOLCHAIN_DIR")
File.open(xcconfig_path, "w") { |file| file << xcconfig_mod }
end
end
end
主要是下面加的这段话
如果已经原本有pod文件内容啥的,最好先把pod清除一遍,然后再重新进行pod
#移除pod锁定文件
rm Podfile.lock
#移除pod下来的三方库
rm -rf Pods/
#最后手动删除.xcworkspace,然后
pod install
可能重新pod后还会报错

截屏2025-07-29 09.37.55.png
在这里把relase的arm64删除,重新编译一下就可以了