Vinu David Jose
Vinu David Jose

Reputation: 2638

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

Upvotes: 2

Views: 1018

Answers (1)

P.Todorov
P.Todorov

Reputation: 43

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.

Upvotes: 3

Related Questions