function getXcodeArchiveArgs()

in lib/build.js [433:468]


function getXcodeArchiveArgs (projectPath, outputPath, exportOptionsPath, buildConfig = {}) {
    const options = [];
    const buildFlags = buildConfig.buildFlag;
    const customArgs = {};
    customArgs.otherFlags = [];

    if (buildFlags) {
        if (typeof buildFlags === 'string' || buildFlags instanceof String) {
            parseBuildFlag(buildFlags, customArgs);
        } else { // buildFlags is an Array of strings
            buildFlags.forEach(flag => {
                parseBuildFlag(flag, customArgs);
            });
        }
    }

    if (buildConfig.automaticProvisioning) {
        options.push('-allowProvisioningUpdates');
    }
    if (buildConfig.authenticationKeyPath) {
        options.push('-authenticationKeyPath', buildConfig.authenticationKeyPath);
    }
    if (buildConfig.authenticationKeyID) {
        options.push('-authenticationKeyID', buildConfig.authenticationKeyID);
    }
    if (buildConfig.authenticationKeyIssuerID) {
        options.push('-authenticationKeyIssuerID', buildConfig.authenticationKeyIssuerID);
    }

    return [
        '-exportArchive',
        '-archivePath', customArgs.archivePath || 'App.xcarchive',
        '-exportOptionsPlist', exportOptionsPath,
        '-exportPath', outputPath
    ].concat(options).concat(customArgs.otherFlags);
}