uploadToIOS method
Uploads the build artifact to the iOS App Store
Implementation
Future<void> uploadToIOS({
required BPConfig config,
}) async {
var iosOut = await ProcessHelper.runCommandUsingConfig(
startMessage: "Starting to publish the iOS app...",
errorMessage: "There was a problem in publishing the iOS app",
successMessage: "√ iOS app is successfully published",
executable: "xcrun",
exitIfError: false,
redactions: [
appAppleID,
issuerID,
keyID,
],
arguments: [
"altool",
"--upload-package",
outputFilePath,
"-t",
'ios',
"--apple-id",
appAppleID,
"--bundle-id",
'"$bundleID"',
"--apiKey",
keyID,
"--apiIssuer",
issuerID,
"--bundle-short-version-string",
config.version,
"--bundle-version",
config.buildVersion,
"--asc-public-id",
issuerID,
"--output-format",
"json",
],
config: config,
);
if (iosOut.$1 != 0 && iosOut.$2.isNotEmpty) {
try {
Map<String, dynamic> iosErr = jsonDecode(iosOut.$2[0]);
if (iosErr.containsKey("product-errors")) {
List<dynamic> peList = iosErr["product-errors"];
for (var pe in peList) {
Console.logError("-- ${pe["userInfo"]["NSLocalizedFailureReason"] ?? "-"}\n");
}
}
} catch (_) {}
}
}