多年来,我一直在我的项目中使用ViperMcFlurry,没有遇到任何问题,使用XCode 12 beta 6时,它会在Incompatible block pointer types sending
错误中返回我。我试过各种方法来修复它,但没有机会。它返回
Incompatible block pointer types sending 'id<RamblerViperModuleOutput> (^)(__strong id<RamblerModuleBetaInput>)' to parameter of type 'RamblerViperModuleLinkBlock' (aka 'id<RamblerViperModuleOutput> (^)(__strong id<RamblerViperModuleInput>)')
我尝试做的是
[[self.transitionHandler openModuleUsingSegue:RamblerAlphaToBetaSegue]
thenChainUsingBlock:^id<RamblerViperModuleOutput>(id<RamblerModuleBetaInput> moduleInput) {
[moduleInput configureWithExampleString:exampleString];
return nil;
}];
我有
@protocol RamblerModuleBetaInput <RamblerViperModuleInput>
在CCD_ 2中。我还有
@protocol RamblerViperModuleInput <NSObject>
在RamblerViperModuleInput.h
中
请参阅https://github.com/rambler-digital-solutions/ViperMcFlurry/pull/37或者暂时可以通过在"构建设置"CFLAGS
中添加标志来禁用检查-Xclang -fcompatibility-qualified-id-block-type-checking
来解决此问题。