Arguments.fromArgParser constructor
Arguments.fromArgParser(
- ArgResults results,
- ArgResults? globalResults
Creates Arguments instance from command-line arguments.
Parses command-line arguments and optional global results to create a fully configured Xcrun Arguments instance. Handles type conversion and validation for all Xcrun-specific parameters.
Parameters:
results- Parsed command-line argumentsglobalResults- Optional global command arguments
Returns configured Arguments instance with parsed values. Uses first rest argument as file path if available, otherwise defaults to standard iOS distribution output directory.
Implementation
factory Arguments.fromArgParser(
ArgResults results,
ArgResults? globalResults,
) =>
Arguments(
Variables.fromSystem(globalResults),
filePath:
results.rest.firstOrNull ?? Files.iosDistributionOutputDir.path,
username: results['username'] as String?,
password: results['password'] as String?,
apiKey: results['api-key'] as String?,
apiIssuer: results['api-issuer'] as String?,
appleId: results['apple-id'] as String?,
bundleVersion: results['bundle-version'] as String?,
bundleShortVersionString:
results['bundle-short-version-string'] as String?,
ascPublicId: results['asc-public-id'] as String?,
type: results['type'] as String?,
validateApp: results['validate-app'] as bool? ?? false,
uploadPackage: results['upload-package'] as String?,
bundleId: results['bundle-id'] as String?,
productId: results['product-id'] as String?,
sku: results['sku'] as String?,
outputFormat: results['output-format'] as String?,
);