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

kjmcneish

  • 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: https://itunes.apple.com/us/book/learn-to-code-in-swift/id942956811?mt=11
Check out our Robot Tic-Tac-Toe app: https://itunes.apple.com/us/app/robot-tic-tac-toe/id990638517?mt=8
« Last Edit: November 11, 2015, 12:15:50 PM by kjmcneish »