Post

Replies

Boosts

Views

Activity

Reply to Error loading a model of CoreML
I had the same problem working on the tutorial Hacking with Swift from Paul. Here I found the explanation: https://codecrew.codewithchris.com/t/core-ml-module-own-model-does-not-work/22028/4 from Inaki: However, what worked for me is to run the app on an actual device (an iPhone in my case). I’m not sure if this is due to a breaking change with Xcode 14, but running the model requires access to the home directory now compared to when it was recorded (for some reasons unknown to me), and you can’t access that directory in SwiftUI preview and iOS simulator due to it being sandboxed. You can, however, have the app access to this directory by using an actual device to test your app. So, running the app on a real device I don't see a problem anymore.
May ’23