简体   繁体   English

执行'application:handleActionWithIdentifier:forRemoteNotification:completionHandler时的参数类型冲突

[英]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.

相关问题 从应用程序获取位置:handleActionWithIdentifier:forRemoteNotification:completeHandler: - getting location from application: handleActionWithIdentifier: forRemoteNotification: completionHandler: 'session:didReceiveMessage的实现中参数类型冲突 - Conflicting parameter types in implementation of 'session:didReceiveMessage 在iOS中的handleActionWithIdentifier:forRemoteNotification中使http调用更快? - Make http call faster in handleActionWithIdentifier:forRemoteNotification in iOS? 执行'userNotificationCenter:didReceiveNotificationResponse时出现冲突的参数类型 - Conflicting parameter types in implementation of 'userNotificationCenter:didReceiveNotificationResponse application:handleActionWithIdentifier:未调用 - application:handleActionWithIdentifier: not called 滚动视图委托的参数类型冲突 - Conflicting Parameter Types for Scroll View Delegate 在WatchOS上替代application:handleIntent:completionHandler: - Alternative to application:handleIntent:completionHandler: on WatchOS iOS4的实现 - [NSURLConnection sendAsynchronousRequest:queue:completionHandler:]? - iOS4 Implementation of -[NSURLConnection sendAsynchronousRequest:queue:completionHandler:]? 'SecRandomCopyBytes'的冲突类型 - Conflicting types for 'SecRandomCopyBytes' Swift-CompletionHandler模​​板化为函数中的参数(UsingObjectMapper) - Swift - CompletionHandler templated as parameter in function (UsingObjectMapper)
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM