Author Topic: How to fix the "Module was not compiled for testing" compiler error  (Read 10184 times)


  • Administrator
  • *****
  • Posts: 719
    • View Profile
When you use the @testable import attribute, in your testing project, you may receive a "Module was not compiled for testing" compiler error.

To fix this problem:

1. Select the first node in your project do display the Project Editor
2. Select your main project's target
3. Go to the Build Settings tab and set Enable Testability to Yes.

All the best!
Kevin McNeish
Author of Learn to Code in Swift:
Check out our Robot Tic-Tac-Toe app:
« Last Edit: November 11, 2015, 12:15:50 PM by kjmcneish »