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

相关推荐
一如初夏丿4 天前
xcode15 报错 does not contain ‘libarclite‘
ios·xcode
app开发工程师V帅4 天前
Xcode 文件缺失:Missing submodule xxx
ide·macos·xcode
app开发工程师V帅4 天前
Xcode 16 编译弹窗问题、编译通过无法,编译通过打包等问题汇总
macos·xcode
请叫我飞哥@7 天前
iOS在项目中设置 Dev、Staging 和 Prod 三个不同的环境
ios·xcode·swift
B.-8 天前
减少 Flutter 应用体积的常用方法
学习·flutter·android studio·xcode
名字不要太长 像我这样就好10 天前
【iOS】OC语法知识小结
ios·cocoa·xcode
zhangfang6810 天前
Go 语言切片(Slice)
开发语言·golang·xcode
davidson147111 天前
Xcode
ios·swiftui·xcode·swift·apple
tealcwu12 天前
【Unity踩坑】Unity生成iOS的XCode项目时提示错误:xcrun: error: SDK “iphoneos“ cannot be located
unity·ios·xcode
望天hous12 天前
go 怎么判断一个文件存在,并且如果存在则读取文件,并json反序列化 string切片
golang·json·xcode