如果我写var scheduler = TestScheduler(initialClock: 0)
我的进口
import XCTest
import RxTest
有错误消息
无法从错误的名称'7RxSwift20VirtualTimeSchedulerCy0A4Test0fecD9ConverterVG'分解TestScheduler的超类
pod版本
pod 'RxBlocking', '~> 5'
pod 'RxTest', '~> 5'
答案 0 :(得分:2)
这是Cocoapods + XCode 10.2平台的错误。
XCode 10.2 RC中的声明涉及已知问题:
Linking against a static Swift library might create a binary with missing
type metadata because the object files that define the metadata inside the
static archive are mistakenly considered unused. (47598583)
This can manifest as a Swift runtime error with a message such as:
“failed to demangle superclass of MyClass from mangled name ‘<mangled name>’”.
Workaround: If you can rebuild the static library, try building it with whole module
optimization enabled.
Otherwise, add -all_load to the linker flags in the client binary to
ensure all object files are linked into it.