function overwritePrivacyManifest (manifest, locations) {
    const privacyManifestDest = path.join(locations.xcodeCordovaProj, 'PrivacyInfo.xcprivacy');
    if (manifest != null) {
        const XML_DECLARATION = '<?xml version="1.0" encoding="UTF-8"?>\n';
        const DOCTYPE = '<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">\n';
        const plistElement = et.Element('plist');
        plistElement.set('version', '1.0');
        const dictElement = et.SubElement(plistElement, 'dict');
        manifest.getchildren().forEach((child) => {
            dictElement.append(child);
        });
        const etree = new et.ElementTree(plistElement);
        const xmlString = XML_DECLARATION + DOCTYPE + etree.write({ xml_declaration: false });
        fs.writeFileSync(privacyManifestDest, xmlString, 'utf-8');
        return;
    }
    // Set default privacy manifest
    const defaultPrivacyManifest = path.join(__dirname, '..', 'templates', 'project', 'App', 'PrivacyInfo.xcprivacy');
    const xmlString = fs.readFileSync(defaultPrivacyManifest, 'utf8');
    fs.writeFileSync(privacyManifestDest, xmlString, 'utf-8');
}
Overwrites the privacy manifest file with the provided manifest or sets the default manifest.
@param {ElementTree} manifest - The manifest to be written to the privacy manifest file.
@param {Object} locations - The locations object containing the path to the Xcode Cordova project.