From 66d1ed49771d3c6876ad26287ea725fbbed2d672 Mon Sep 17 00:00:00 2001 From: Kingkor Roy Tirtho Date: Mon, 6 May 2024 21:14:59 +0600 Subject: [PATCH] feat: add ios build support --- cli/commands/build/ios.dart | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/cli/commands/build/ios.dart b/cli/commands/build/ios.dart index e69de29b..dfb7ce51 100644 --- a/cli/commands/build/ios.dart +++ b/cli/commands/build/ios.dart @@ -0,0 +1,29 @@ +import 'dart:async'; + +import 'package:args/command_runner.dart'; +import 'package:path/path.dart'; + +import '../../core/env.dart'; +import 'common.dart'; + +class IosBuildCommand extends Command with BuildCommandCommonSteps { + @override + String get description => "iOS build command"; + + @override + String get name => "ios"; + + @override + FutureOr? run() async { + await bootstrap(); + + final buildDirPath = join(cwd.path, "build", "ios", "iphoneos"); + await shell.run( + """ + flutter build ios --release --no-codesign --flavor ${CliEnv.channel} + ln -sf $buildDirPath Payload + zip -r9 Spotube-iOS.ipa ${join("Payload", "${CliEnv.channel}.app")} + """, + ); + } +}