AddPushNotifications does't work

var projCapManager = new ProjectCapabilityManager(projPath, “app.entitlements”, “Unity-iPhone”);
projCapManager.AddPushNotifications(true);
projCapManager.AddBackgroundModes(BackgroundModesOptions.RemoteNotifications);
projCapManager.WriteToFile();

I use this way in order to configure the xcode project automatically, the entitlements has created, but when I check the capabilities in the “Unity-iPhone” target, these two toggles are still off(PushNotifications and BackgroundModes)

I have seen the same problem in the forum but not getting any solution.
Could anyone help me? Thanks all the same.

I’m using “Entitlements.entitlements” instead of “app.entitlements”
Maybe that is the reason?