Error during the xcode build, after installing the system of push notifications
Ionic version 3 I followed this tutorial to implement the push system https://ionicframework.com/docs/native/push/
but I am not able to build
he asks me to add void -> Image here 1
after i add void , he asks me to remove void -> Image here 2
-
(void)application:(UIApplication *) application handleActionWithIdentifier: (NSString *) identifier
forRemoteNotification: (NSDictionary *) notification completionHandler: (void (^)()) completionHandler {NSLog(@“Push Plugin handleActionWithIdentifier %@”, identifier);
NSMutableDictionary *userInfo = [notification mutableCopy];
[userInfo setObject:identifier forKey:@“actionCallback”];
NSLog(@“Push Plugin userInfo %@”, userInfo);if (application.applicationState == UIApplicationStateActive) {
PushPlugin *pushHandler = [self getCommandInstance:@“PushNotification”];
pushHandler.notificationMessage = userInfo;
pushHandler.isInline = NO;
[pushHandler notificationReceived];
} else {
void (^safeHandler)(void) = ^(void){
dispatch_async(dispatch_get_main_queue(), ^{
completionHandler();
});
};PushPlugin *pushHandler = [self getCommandInstance:@"PushNotification"]; if (pushHandler.handlerObj == nil) { pushHandler.handlerObj = [NSMutableDictionary dictionaryWithCapacity:2]; } id notId = [userInfo objectForKey:@"notId"]; if (notId != nil) { NSLog(@"Push Plugin notId %@", notId); [pushHandler.handlerObj setObject:safeHandler forKey:notId]; } else { NSLog(@"Push Plugin notId handler"); [pushHandler.handlerObj setObject:safeHandler forKey:@"handler"]; }
pushHandler.notificationMessage = userInfo;
pushHandler.isInline = NO;