m1 pro构建iOS应用程序运行时错误:此平台不支持COLLADA文件



m1pro芯片(我的新MacBook Pro 14'(中,iOS应用程序加载dae文件错误。模拟器和设备均发生碰撞。

func makeUIView(context: Context) -> UIView {
let scene = SCNScene(named: "art.scnassets/3dmodel.dae")!   //crash here, error "COLLADA files are not supported on this platform."
...other code...
}

但相同的代码适用于intel芯片(MacBook Pro 13'2017(构建的iOS应用

问题:苹果m1pro芯片不支持dae文件吗但是c4d在m1pro中运行良好。

环境:

  • MacOS12.1
  • xcode 13.1

尝试过:

  • MacOS12.0.1->MacOS12.1

  • xcode 12->xcode 13

  • 模拟器和iOS设备

  • iOS 14->iOS 15

以上所有内容均无效。

已解析。通过这样做

sudo xcode-select --reset

因为我在构建时发现了警告。生成警告

请注意,xcode实际上在构建时将dae文件转换为scn文件,但警告称转换失败。然后我尝试运行xcrun-scntool,它出现了错误。

xcrun scntool
scntool: warning: Could not find bundle inside /Library/Developer/CommandLineTools
at path /Library/Developer/SharedFrameworks/ModelIO.framework
scntool: warning: Could not find bundle inside /Library/Developer/CommandLineTools
at path /Library/Developer/SharedFrameworks/SceneKit.framework
scntool: warning: Could not find bundle inside /Library/Developer/CommandLineTools
at path /Library/Developer/SharedFrameworks/PhysicsKit.framework
scntool: warning: Could not find bundle inside /Library/Developer/CommandLineTools
at path /Library/Developer/SharedFrameworks/Jet.framework
scntool: warning: Could not find bundle inside /Library/Developer/CommandLineTools
at path /Library/Developer/SharedFrameworks/SpriteKit.framework
usage: scntool --convert file --format format [--output file]
scntool: error: (null)

ComandLineTool有问题,所以我做了这篇文章中的步骤。命令行工具已经安装;软件更新";要安装更新吗?

它是有效的。构建没有scntool警告的应用程序,并且该应用程序运行良好。

最新更新