iOS App Development Book/Video Series

General Category => FAQs => Topic started by: kjmcneish on October 22, 2015, 05:00:00 PM

Title: How to fix the "Module was not compiled for testing" compiler error
Post by: kjmcneish on October 22, 2015, 05:00:00 PM
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 (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 (https://itunes.apple.com/us/app/robot-tic-tac-toe/id990638517?mt=8)