Incompatible block pointer types sending 'id issue with ViperMcFlurry

822 Views Asked by At

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

There are 1 best solutions below

0
On

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.