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

前端 未结 10 865
难免孤独
难免孤独 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:16

    For those of you who are experiencing this only upon running Xcode Profiler: switch profile build configuration in your scheme management to the one that has testability enabled - and that would be debug in most cases:

提交回复
热议问题