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

相关推荐
思成Codes2 天前
Gin路由:构建高效RESTful API
golang·restful·xcode·gin
大猫熊猫2 天前
【ios】xcode运行项目时报错 Showing All Errors Only Framework ‘Pods_Runner‘ not found
macos·ios·xcode
2501_915106324 天前
iOS App 测试方法,通过 Xcode、Instruments、Safari Inspector、克魔(KeyMob)等工具
android·ios·小程序·uni-app·iphone·xcode·safari
2501_916007474 天前
Xcode 在 iOS 上架中的定位,多工具组合
android·macos·ios·小程序·uni-app·iphone·xcode
xiAo_Ju4 天前
Xcode 26 Debug view hierarchy 不显示隐藏视图问题
xcode
bybitq4 天前
Go函数闭包实战-复用函数
ios·golang·xcode
chen_x_x5 天前
域格模组使用http下载到文件系统以及分段下载
网络协议·http·xcode
游戏开发爱好者88 天前
苹果 App 上架流程,结合 Xcode、CI 等常见工具
macos·ios·ci/cd·小程序·uni-app·iphone·xcode
denggun1234510 天前
卡顿监测原理
macos·ios·xcode
ChineHe11 天前
Gin框架入门篇002_第一个Gin服务
macos·xcode·gin