首页 > 解决方案 > 如何合并 `iphoneos` 和 `iphonesimulator` 的构建,就像我们过去对使用 `lipo` 的框架所做的那样

问题描述

根据标题,有没有办法iphonesimulatoriphoneos构建合并,以便以后可以分发和使用?

我尝试过lipo以下投诉:

fatal error: lipo: can't figure out the architecture type of: *.metallib

另外,我已经尝试过-destination generic/platform=iOS它看起来只为 iPhone 构建,因此在针对模拟器运行时输出以下内容:

Failed to created pipeline state, error Error Domain=CompilerError Code=1 "Target OS is incompatible: library was not compiled for the simulator" UserInfo={NSLocalizedDescription=Target OS is incompatible: library was not compiled for the simulator} -[MTLDebugRenderCommandEncoder setRenderPipelineState:]:1294: failed assertion `renderPipelineState must not be nil.'

这让我想到了我的问题——我的选择是什么?

任何建议表示赞赏!

标签: iosmetalxcodebuild

解决方案


Metal 是它自己的编译格式,它不像 CPU 代码。没有金属模拟器,所以这个问题没有意义。您不应该在 Metal 编译的代码上使用 lipo。


推荐阅读