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);
}
Returns array of arguments for xcodebuild
@param  {String}  projectPath        Path to project file. Will be used to set CWD for xcodebuild
@param  {String}  outputPath         Output directory to contain the IPA
@param  {String}  exportOptionsPath  Path to the exportOptions.plist file
@param  {Object}  buildConfig        Build configuration options
@return {Array}                      Array of arguments that could be passed directly to spawn method