问题
I was using ViperMcFlurry in my project without a problem for years and with XCode 12 beta 6 it returns me in Incompatible block pointer types sending
error. I have tried various ways to fix it but no chance. It returns
Incompatible block pointer types sending 'id<RamblerViperModuleOutput> (^)(__strong id<RamblerModuleBetaInput>)' to parameter of type 'RamblerViperModuleLinkBlock' (aka 'id<RamblerViperModuleOutput> (^)(__strong id<RamblerViperModuleInput>)')
What I try to do is
[[self.transitionHandler openModuleUsingSegue:RamblerAlphaToBetaSegue]
thenChainUsingBlock:^id<RamblerViperModuleOutput>(id<RamblerModuleBetaInput> moduleInput) {
[moduleInput configureWithExampleString:exampleString];
return nil;
}];
and I have
@protocol RamblerModuleBetaInput <RamblerViperModuleInput>
in RamblerModuleBetaInput.h
. Also I have
@protocol RamblerViperModuleInput <NSObject>
in RamblerViperModuleInput.h
回答1:
Please see https://github.com/rambler-digital-solutions/ViperMcFlurry/pull/37 or temporarily you can work it around by adding flags into Build Settings CFLAGS
to disable check -Xclang -fcompatibility-qualified-id-block-type-checking
.
来源:https://stackoverflow.com/questions/63621059/incompatible-block-pointer-types-sending-id-issue-with-vipermcflurry