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

相关推荐
秋雨梧桐叶落莳11 天前
iOS——QQ音乐仿写项目总结
学习·macos·ui·ios·mvc·objective-c·xcode
92year15 天前
Xcode 27 AI Agent 实测:苹果把 Claude、ChatGPT、Gemini 都塞进了 IDE
agent·ai编程·xcode·apple·wwdc
健了个平_2416 天前
iOS 27 适配笔记
ios·xcode·wwdc
邓小乐17 天前
Workaround: Xcode27 下载iOS 27.0 Simulator
ios·xcode
2601_9611940218 天前
27考研资料|百度网盘|夸克网盘
android·xml·考研·ios·iphone·xcode·webview
大熊猫侯佩18 天前
WWDC26 前瞻:苹果可能放出的“王炸”,不只是 Siri
xcode·swift·wwdc
pop_xiaoli20 天前
【iOS】通知传值实现
macos·ios·xcode
小宋102123 天前
Mina Meeting Assistant 新手极速上手指南
ide·macos·ai·xcode·mina
欧阳天羲25 天前
AI智能水枪完整开发攻略
人工智能·macos·xcode
会编程的土豆1 个月前
Go 语言匿名函数详解
c++·golang·xcode