2
- (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)'

Vinu David Jose
  • 2,569
  • 1
  • 21
  • 38
  • pls check https://developer.apple.com/documentation/uikit/uiapplicationdelegate/1623068-application?language=objc – Jigar Jun 26 '18 at 07:11

1 Answers1

3

A workaround is to disable Clang's -Wstrict-prototypes like so:

- (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. This appears to be a bug.

P.Todorov
  • 43
  • 10