PatchIosCommand class
Command for creating patches for iOS applications through Shorebird.
This command creates a Shorebird patch for iOS applications, allowing for over-the-air updates to be deployed to existing iOS app installations without requiring a full app update through the App Store.
Usage
morpheme shorebird patch ios --flavor dev
morpheme shorebird patch ios --flavor prod --build-number 123
Options
All standard Shorebird options are supported:
--flavor: The build flavor (dev, staging, prod)--target: The main entry point file--morpheme-yaml: Path to morpheme.yaml configuration--build-number: Build number for targeting specific release--build-name: Build name for targeting specific release--split-debug-info: Path for split debug information--generate-l10n: Generate localization files
iOS-specific options:
--export-method: iOS export method (should match original release)--export-options-plist: Path to export options plist file
Platform Requirements
This command requires macOS and properly configured iOS development environment including:
- Xcode
- iOS development certificates (if needed)
- Provisioning profiles (if needed)
Patch Targeting
Patches are applied to specific releases. You can target a release by:
- Specifying build number and build name
- Using the release version string format
Examples
Create a patch for the current development version:
morpheme shorebird patch ios --flavor dev
Create a patch targeting a specific production release:
morpheme shorebird patch ios --flavor prod --build-number 42 --build-name 1.2.0
Create a patch with specific export method:
morpheme shorebird patch ios --flavor staging --export-method ad-hoc
Create a patch with custom export options:
morpheme shorebird patch ios --flavor prod --export-options-plist ios/ExportOptions.plist
Important Notes
- The patch must be compatible with the target release
- Export method and options should match the original release
- Dart defines and environment must match the target release
- Some code changes may not be patchable and require a full release
- Code signing is typically not required for patches
- Inheritance
-
- Object
- Command
- ShorebirdBaseCommand
- ShorebirdPatchBaseCommand
- PatchIosCommand
Constructors
Properties
-
aliases
→ List<
String> -
Alternate names for this command.
no setterinherited
- argParser → ArgParser
-
The argument parser for this command.
no setterinherited
- argResults → ArgResults?
-
The parsed argument results for this command.
no setterinherited
- category → String
-
The command's category.
no setterinherited
- description → String
-
A description of this command, included in usage.
no setteroverride
- globalResults → ArgResults?
-
The parsed global argument results.
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
-
Whether or not this command should be hidden from help listings.
no setterinherited
- invocation → String
-
A single-line template for how to invoke this command (e.g.
"pub getpackage").no setterinherited - isAndroid → bool
-
Whether this is an Android patch command.
no setterinherited
- isIos → bool
-
Whether this is an iOS patch command.
no setterinherited
- name → String
-
The name of this command.
no setteroverride
- parent → Command?
-
The command's parent command, if this is a subcommand.
no setterinherited
- platformType → String
-
The platform type for this patch command (android, ios).
no setteroverride
- runner → CommandRunner?
-
The command runner for this command.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
subcommands
→ Map<
String, Command> -
An unmodifiable view of all sublevel commands of this command.
no setterinherited
-
suggestionAliases
→ List<
String> -
Alternate non-functional names for this command.
no setterinherited
- summary → String
-
A short description of this command, included in parent's
CommandRunner.usage.
no setterinherited
- takesArguments → bool
-
Whether or not this command takes positional arguments in addition to
options.
no setterinherited
- usage → String
-
Generates a string displaying usage information for this command.
no setterinherited
-
An optional footer for usage.
no setterinherited
Methods
-
addPlatformSpecificOptions(
ArgParser argParser) → void -
Adds platform-specific options.
inherited
-
addStandardOptions(
ArgParser argParser) → void -
Adds standard options that are common to all Shorebird commands.
inherited
-
addSubcommand(
Command command) → void -
Adds Command as a subcommand of this.
inherited
-
buildDartDefines(
Map< String, String> flavorConfig) → List<String> -
Builds dart defines list from flavor configuration.
inherited
-
buildEnvironmentVariables(
Map< String, String> flavorConfig) → Map<String, String> -
Builds environment variables map for command execution.
inherited
-
executeCommand(
ShorebirdCommandConfig config) → Future< ShorebirdResult> -
Executes the actual Shorebird command.
inherited
-
extractCommonArguments(
) → Map< String, dynamic> -
Extracts common arguments from command line results.
inherited
-
handleError(
dynamic error, Duration duration) → void -
Handles command execution errors.
inherited
-
handleSuccess(
ShorebirdResult result, Duration duration) → void -
Handles successful command execution.
inherited
-
logCommand(
String command) → void -
Logs the command that is about to be executed.
inherited
-
logCommandComplete(
String commandName, Duration duration) → void -
Logs the completion of a command execution.
inherited
-
logCommandStart(
String commandName, String flavor) → void -
Logs the start of a command execution.
inherited
-
logDebug(
String message) → void -
Logs debug information (only when debug mode is enabled).
inherited
-
logError(
String message) → void -
Logs an error message.
inherited
-
logInfo(
String message, {String prefix = 'Info'}) → void -
Logs an informational message.
inherited
-
logSetup(
String component) → void -
Logs a setup step.
inherited
-
logStep(
String step) → void -
Logs a step in the execution process.
inherited
-
logSuccess(
String message) → void -
Logs a success message.
inherited
-
logValidation(
String item) → void -
Logs a validation step.
inherited
-
logWarning(
String message) → void -
Logs a warning message.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
postExecutionCleanup(
ShorebirdResult result) → Future< void> -
Performs post-execution cleanup tasks.
inherited
-
preExecutionSetup(
ShorebirdCommandConfig config) → Future< void> -
Performs pre-execution setup tasks.
inherited
-
printUsage(
) → void -
Prints the usage information for this command.
inherited
-
run(
) → Future< void> -
Template method defining the command execution workflow.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
usageException(
String message) → Never -
Throws a UsageException with
message.inherited -
validateAndBuildConfig(
) → Future< ShorebirdCommandConfig> -
Validates command arguments and builds the command configuration.
inherited
-
validateAndGetFlavor(
ArgResults? argResults, {String defaultTo = Constants.dev}) → String -
Validates and extracts the flavor value from command arguments.
inherited
-
validateAndGetFlavorConfig(
String flavor, String morphemeYamlPath) → Map< String, String> -
Validates that a flavor exists in the configuration.
inherited
-
validateBuildNumber(
String? buildNumber) → void -
Validates build number format.
inherited
-
validateExportMethod(
String? exportMethod) → void -
Validates export method for iOS builds.
inherited
-
validateExportOptionsPlist(
String? exportOptionsPlist) → void -
Validates that export options plist file exists (if specified).
inherited
-
validateMorphemeYaml(
String morphemeYamlPath) → void -
Validates the morpheme.yaml configuration file.
inherited
-
validateRequiredArguments(
ArgResults? argResults) → bool -
Validates that all required arguments are present and valid.
inherited
-
validateShorebirdConfig(
String flavor, String morphemeYamlPath) → (String?, Map?) -
Validates that Shorebird configuration exists for the flavor.
inherited
-
validateTarget(
String target) → void -
Validates that a target file exists and is accessible.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited