我试图在传统的Objc代码中测试一些Swift类(@objc类)。我在我的测试类中导入了“UnitTests-Swift.h”。未在UnitTest中找到模块“MyApp”Swift
然后我得到这个错误:
Module "MyApp" not found in the autogenerated "UnitTests-Swift.h"
这是“单元测试,Swift.h”
typedef int swift_int3 __attribute__((__ext_vector_type__(3)));
typedef int swift_int4 __attribute__((__ext_vector_type__(4)));
#if defined(__has_feature) && __has_feature(modules)
@import XCTest;
@import ObjectiveC;
@import MyApp;
@import CoreData;
#endif
我清理项目的顶部内什么,检查了所有相关的标志("No such module" when using @testable in Xcode Unit tests,Can't use Swift classes inside Objective-C),删除派生数据等..不知道发生了什么,但我很确定@import MyApp不应该在那里..
C任何人都可以帮助我?
我也有这个问题。 – Uncommon
通过请求,我已经在Swift错误数据库中提交了这个:https://bugs.swift。org/browse/SR-3381 – Uncommon
这是可以在Xcode 7中复制的东西,还是需要使用旧版本制作的obj-c项目?你能否提供从头开始重现的步骤? – charmingToad