[英]Conflicting parameter types in implementation of 'application:handleActionWithIdentifier:forRemoteNotification:completionHandler
- (void)application:(UIApplication *)application handleActionWithIdentifier:(NSString *)identifier forRemoteNotification:(NSDictionary *)userInfo completionHandler:(void (^)(void))completionHandler {}
I am getting this warning. 我收到了这个警告。 Can someone tell what is the problem here?
有人能告诉我这里有什么问题吗?
Conflicting parameter types in implementation of 'application:handleActionWithIdentifier:forRemoteNotification:completionHandler:': 'void (^ _Nonnull __strong)()' vs 'void (^__strong _Nonnull)(void)'
'application:handleActionWithIdentifier:forRemoteNotification:completionHandler:':'void(^ _Nonnull __strong)()'vs'void(^ __ strong _Nonnull)(void)'的实现中存在冲突的参数类型
A workaround is to disable Clang's -Wstrict-prototypes like so: 解决方法是禁用Clang的-Wstrict-prototypes,如下所示:
- (void)application:(UIApplication *)application handleActionWithIdentifier:(NSString *)identifier forRemoteNotification:(NSDictionary *)userInfo
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wstrict-prototypes"
completionHandler:(void(^)())completionHandler
#pragma clang diagnostic pop
{}
The same is with the handleActionWithIdentifier:forLocalNotifications. handleActionWithIdentifier:forLocalNotifications也是如此。 This appears to be a bug.
这似乎是一个错误。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.