M2 Mac Xcode编译报错 ‘***.framework/‘ for architecture arm64

In /Users/fly/Project/Pods/YYKit/Vendor/WebP.framework/WebP(anim_decode.o), building for iOS Simulator, but linking in object file built for iOS, file '/Users/fly/Project/Pods/YYKit/Vendor/WebP.framework/WebP' for architecture arm64

这是我当时编译模拟器时报的错

1、在 Build Settings 里面先设置EXCLUDED_ARCHS,设置Any iOS Simulator SDK = arm64。

2、在 User-Defind 下面添加EXLUDED_ARCHS,设置arm64

3、在 Podfile 文件中添加一下代码

复制代码
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'] = '12.0'
            config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64"
       end
    end
  end
end

重新 pod installer

相关推荐
帅次1 小时前
Flutter Container 组件详解
android·flutter·ios·小程序·kotlin·iphone·xcode
白玉cfc19 小时前
【iOS】cell的复用以及自定义cell
ios·cocoa·xcode
黑码哥2 天前
Copilot for Xcode (iOS的 AI辅助编程)
人工智能·copilot·ai编程·xcode·ai辅助编程
键盘敲没电5 天前
【IOS】GCD学习
学习·ios·objective-c·xcode
roman_日积跬步-终至千里6 天前
【Go语言基础】基本语法
开发语言·golang·xcode
Daniel_Coder6 天前
Xcode 16.4 + iOS 18 系统运行时崩溃:___cxa_current_primary_exception 符号丢失的原因与解决方案
ios·xcode·ios 18·dyld·libc++abi
LAOning117 天前
xcode 各版本真机调试包下载
ide·macos·xcode
豪冷啊7 天前
iOS UIActivityViewController 组头处理
ios·objective-c·xcode
白总Server8 天前
Golang 依赖注入:构建松耦合架构的关键技术
linux·运维·服务器·macos·架构·golang·xcode