LoginSignup
0
0

More than 5 years have passed since last update.

@testable importで'MyProject' was not compiled for testingエラー

Last updated at Posted at 2018-07-27

テストプロジェクトでテストの対象となるプロジェクトに対して、以下のようにimportするとpublicでない変数やメソッドを呼び出せる。

@testable import MyProject

しかし、古いプロジェクトでやろうとしたらコンパイルエラーになった。

'MyProject' was not compiled for testing

この場合、Build SettingsのEnable TestabilityをYesにすればよい。

01.png

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0