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

相关推荐
wumu_Love14 小时前
Xcode 15 file-write-create
ide·macos·xcode
1024小神3 天前
xcode快捷键使用操作,快速选中当前行
xcode
OKXLIN5 天前
XCode集成第三方framework步骤
ide·macos·framework·xcode
humiaor6 天前
Xcode为不同环境配置不同的环境变量
ide·macos·xcode·xcode多环境·user-defined
LinXunFeng10 天前
Flutter - Xcode16 还原编译速度
前端·flutter·xcode
1024小神15 天前
theos工具来编译xcode的swiftUI项目为ipa文件
macos·swiftui·xcode
watersink15 天前
基于大模型的pc版语音对话问答
ide·macos·xcode
Macle_Chen16 天前
XCode中使用MonkeyDev开发iOS版的Comand-line Tool的daemon程序
macos·ios·xcode·逆向·comand-line
1024小神22 天前
xcode中移除安装的package dependency
xcode
越甲八千22 天前
python 中match...case 和 C switch case区别
c语言·python·xcode