Chapter 3: No such module 'FitNess'

On page 49, it instructs to import FitNess, but when I do Xcode shows the error ‘No such module ‘FitNess’’.

I thought I’d done something wrong in one of the steps, so I opened the final FitNess.xcodeproj and that too fails to build, giving the error message ‘No such module ‘FitNess’’.

Does anyone have some advice on how I can get the AppModelTests to import Fitness?

I’ve tried cleaning the build folder, but still the problem continues.

1 Like

Which version of Xcode are you running?

Just compile, it will work. Well, I’m using this git!

I had this problem too, and I think I solved it. The problem is the error message Xcode is displaying is incorrect! If you comment out any code in the test file and rebuild, Xcode gives you the actual error which is:

Signing for “FitNess” requires a development team. Select a development team in the Signing & Capabilities editor.

So - if you go the Signing & Capabilities editor and add your development team, this error goes away, and then if you uncomment out the code in the test file, Xcode will no longer be complaining about ‘No such module ‘FitNess’’.

Hopefully that helps.

@craiggrummitt Thank you for sharing your solution - much appreciated!