enablePushNotificationForCI = (basePath, xcodeprojName) => {
    commonFuncs.addAPNSinEntitlements(basePath + xcodeprojName + '/Entitlements-Debug.plist', false);
    commonFuncs.addAPNSinEntitlements(basePath + xcodeprojName + '/Entitlements-Release.plist', true);
}
add APNS env to cordova project Entitlements-Debug.plist and Entitlements-Release.plist
This two file will work when xcode archive app