如何解决ViperMcFlurry的不兼容块指针类型发送'id问题
多年以来,我一直在项目中使用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
解决方法
请参阅https://github.com/rambler-digital-solutions/ViperMcFlurry/pull/37,或者暂时可以通过在构建设置CFLAGS
中添加标记来禁用检查-Xclang -fcompatibility-qualified-id-block-type-checking
来解决此问题。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。