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

相关推荐
humiaor17 小时前
Xcode报错:No exact matches in reference to static method ‘buildExpression‘
swiftui·xcode
归辞...19 小时前
「iOS」viewController的生命周期
ios·cocoa·xcode
crasowas1 天前
Flutter问题记录 - 适配Xcode 16和iOS 18
flutter·ios·xcode
蒙娜丽宁2 天前
Go语言错误处理详解
ios·golang·go·xcode·go1.19
Johnny Tong2 天前
iOS 18 适配 Xcode 16 问题
ios·cocoa·xcode
键盘敲没电5 天前
【iOS】UIViewController的生命周期
学习·ios·objective-c·xcode
安和昂7 天前
【iOS】UIViewController的生命周期
ios·xcode·swift
Python私教7 天前
Go语言现代Web开发03 关键字和包以及基本数据类型
开发语言·golang·xcode
2401_863671357 天前
Go-ecc加密解密详解与代码_ecdsa
ios·golang·xcode
键盘敲没电8 天前
【iOS】MVC模式
ios·mvc·objective-c·xcode