记录podFile中,含有zfplayer这种不支持模拟器的处理办法

# 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删除,重新编译一下就可以了

©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容