Upgrade to Capacitor 4: Apple Store ITMS-90078: Missing Push Notification Entitlement

Hello
after the capacitor 4 upgrade, if i upload my app to apple store I get this warning.
I know i can ignore it, but i’d like to solve it. (I’m not using push nofications and in my app capabilities I didn’t set it).

These are my ionic info output and my plugins:

Ionic:

   Ionic CLI                     : 6.20.1 (/usr/local/lib/node_modules/@ionic/cli)
   Ionic Framework               : @ionic/angular 6.2.5
   @angular-devkit/build-angular : 14.1.2
   @angular-devkit/schematics    : 14.1.2
   @angular/cli                  : 14.1.2
   @ionic/angular-toolkit        : 7.0.0

Capacitor:

   Capacitor CLI      : 4.0.1
   @capacitor/android : 4.0.1
   @capacitor/core    : 4.0.1
   @capacitor/ios     : 4.0.1

Utility:

   cordova-res                          : 0.15.4
   native-run (update available: 1.7.0) : 1.6.0

System:

   NodeJS : v14.18.3 (/usr/local/bin/node)
   npm    : 8.14.0
   OS     : macOS Monterey

these are the plugins i’m using:

   @capacitor-community/facebook-login@3.4.0
   @capacitor/app@4.0.1
   @capacitor/splash-screen@4.0.1

am I missing something?

thanks!

ok the solution was removing those functions from AppDelegate.swift

    NotificationCenter.default.post(name: Notification.Name(CAPNotifications.DidRegisterForRemoteNotificationsWithDeviceToken.name()), object: deviceToken)
  }

  func application(_ application: UIApplication, didFailToRegisterForRemoteNotificationsWithError error: Error) {
    NotificationCenter.default.post(name: .capacitorDidFailToRegisterForRemoteNotifications, object: error)
  }