【问题标题】:m1 pro build iOS app runtime error: COLLADA files are not supported on this platformm1 pro build iOS app runtime error: COLLADA files are not supported on this platform
【发布时间】:2022-02-15 13:08:43
【问题描述】:

m1pro 芯片(我的新 MacBook Pro 14')中,iOS App 加载 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 APP

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

环境:

  • MacOS12.1
  • xcode 13.1

试过了:

  • MacOS12.0.1 -> MacOS12.1

  • xcode 12 -> xcode 13

  • 模拟器和 iOS 设备

  • iOS 14 -> iOS 15

以上都行不通。

【问题讨论】:

标签: xcode 3d scenekit apple-m1 collada


【解决方案1】:

已解决。通过这样做

sudo xcode-select --reset

因为我在构建时发现了警告。 build warnings

请注意,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 出了点问题,所以我按照这篇文章的步骤进行了操作。 command line tools are already installed, use "Software Update" to install updates?

它有效。构建应用没有 scntool 警告,应用运行良好。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2022-11-03
    • 2021-12-02
    • 2022-12-26
    • 2019-12-15
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多