'Module was not compiled for testing' when using @testable

前端 未结 10 856
难免孤独
难免孤独 2020-12-04 14:00

I\'m trying to use Swift 2\'s new @testable declaration to expose my classes to the test target. However I\'m getting this compiler error:

10条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-04 14:29

    Above solution is fine if you are using pods/Carthage. But if you are using frameworks from iOS itself 'e.g. Contacts', you need add path to these frameworks in 'Library Search Paths' of your main project's target.

提交回复
热议问题