Incompatible block pointer types sending 'id issue with ViperMcFlurry

风流意气都作罢 提交于 2021-01-29 13:53:48

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!