Chapter 2 page 62 error with HealthySnacks()

Using macOS Catalina 10.15.1, Xcode 11.2.1

for the line
let healthySnacks = HealthySnacks()

I am getting the error: Cannot call value of non-function type ‘module’

Not very sure what is the issue…
think the HealthySnacks.mlmodel doesn’t seem to be imported correctly for this version of Xcode?

Do you get this error when you build the app, or just when you open the Xcode project? Xcode sometimes gives misleading error messages until you actually build the app.

Is there something else called HealthySnacks in your app?

hmm strange, I realised the error message only shows up when the code is selected to build on simulators.
No error message generated when I selected it to build on my mobile device

@fongrel Do you still have issues with this?

Did anyone ever figure out how to fix this? I only get the error when trying to run on an actual device.

I have the same issue also only when trying to run on real device.

It’s probably one of those things Xcode messes up from time to time. Try cleaning your build folder and then build again.

I found the cause if this issue.
To fix it check if everything is correct with app signing.

1 Like

@page80 Do you still have issues with this?