【发布时间】:2020-12-16 15:16:49
【问题描述】:
多年来,我一直在我的项目中使用 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>
在RamblerModuleBetaInput.h。我也有
@protocol RamblerViperModuleInput <NSObject>
在RamblerViperModuleInput.h
【问题讨论】:
-
从错误中 - 它想要
RamblerViperModuleInput而你正在传递RamblerViperModuleBetaInput... 发现差异 - 提示是 beta ... -
是的,但是我不能调用 moduleInput configureWithExampleString:exampleString.
标签: swift objective-c ios14 viper-architecture xcode12beta6