1

This is pretty unusual, because I'm unable to replicate the issue on macOS Monterey. I have a SCNScene object that is initialized in viewDidLoad as such:

scene = SCNScene(named: "art.scnassets/preview.scn")!

And as you can see below, the file exists in my project's Resources under the appropriate path: enter image description here

As previously mentioned, the crash does not occur in builds created under macOS Monterey. Did something change in the resource file path's API?

So far I have tried to initialize using a different way of creating the URL, like so:

scene = try! SCNScene(url: Bundle.main.url(forResource: "art.scnassets/preview", withExtension: "scn")!)
pedrotorres
  • 230
  • 1
  • 10

1 Answers1

0

1. Reset the path to Command Line Tools

To fix this issue, install the latest version of Command_Line_Tools for Xcode 14.1 and then execute these two commands in zsh Terminal (password is required):

sudo xcode-select --reset

sudo xcode-select -switch /Library/Developer/CommandLineTools

Restart your Mac.


2. Renaming process

Rename the art.scnassets to artist.scnassets if the above steps still do not help.

Andy Jazz
  • 49,178
  • 17
  • 136
  • 220