Create an account

Very important

  • To access the important data of the forums, you must be active in each forum and especially in the leaks and database leaks section, send data and after sending the data and activity, data and important content will be opened and visible for you.
  • You will only see chat messages from people who are at or below your level.
  • More than 500,000 database leaks and millions of account leaks are waiting for you, so access and view with more activity.
  • Many important data are inactive and inaccessible for you, so open them with activity. (This will be done automatically)


Thread Rating:
  • 257 Vote(s) - 3.47 Average
  • 1
  • 2
  • 3
  • 4
  • 5
'Module was not compiled for testing' when using @testable

#11
This is probably because your main target `Enable Testability` is set to `NO`. You should set it to `YES` in the debug scheme (which is used for running your tests).

If you use Carthage, this problem can be caused by importing frameworks with `@testable`, because they are built with a release scheme.

Most of the times it's bad practice to import frameworks with that prefix, so you could avoid it.
If you can't, you should `Enable Testability` in the frameworks' release scheme.

[To see links please register here]

Reply

#12
In your main target you need to set the `Enable Testability` build option to Yes.

As per the comment by @earnshavian below, this should only be used on debug builds as per apple release notes: "The Enable Testability build setting should be used only in your Debug configuration, because it prohibits optimizations that depend on not exporting internal symbols from the app or framework"

[To see links please register here]

Reply

#13
This didn't occur in my projects prior to Xcode 8, but after I upgraded to Xcode 8, it made me perplexed.

The answers posted here didn't get my problems resolved. For me, I just ditched these tests as it is not needed. So uncheck the test buttons:

[![enter image description here][1]][1]
And now the error has gone out.


[1]:
Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

©0Day  2016 - 2023 | All Rights Reserved.  Made with    for the community. Connected through