Unverified Commit 18a118b9 authored by Jenn Magder's avatar Jenn Magder Committed by GitHub

Log full app bundle location after "flutter build ios" (#80838)

parent f608d893
......@@ -59,7 +59,7 @@ class BuildIOSCommand extends _BuildIOSSubCommand {
bool get shouldCodesign => boolArg('codesign');
@override
Directory _outputAppDirectory(String xcodeResultOutput) => globals.fs.directory(xcodeResultOutput);
Directory _outputAppDirectory(String xcodeResultOutput) => globals.fs.directory(xcodeResultOutput).parent;
}
/// Builds an .xcarchive and optionally .ipa for an iOS app to be generated for
......
......@@ -425,9 +425,10 @@ Future<XcodeBuildResult> buildXcodeProject({
globals.printTrace('Replacing iphoneos with iphonesimulator in TARGET_BUILD_DIR.');
targetBuildDir = targetBuildDir.replaceFirst('iphoneos', 'iphonesimulator');
}
final String appBundle = buildSettings['WRAPPER_NAME'];
final String expectedOutputDirectory = globals.fs.path.join(
targetBuildDir,
buildSettings['WRAPPER_NAME'],
appBundle,
);
if (globals.fs.directory(expectedOutputDirectory).existsSync()) {
// Copy app folder to a place where other tools can find it without knowing
......@@ -448,6 +449,10 @@ Future<XcodeBuildResult> buildXcodeProject({
],
throwOnError: true,
);
outputDir = globals.fs.path.join(
outputDir,
appBundle,
);
} else {
globals.printError('Build succeeded but the expected app at $expectedOutputDirectory not found');
}
......
......@@ -171,6 +171,7 @@ void main() {
await createTestCommandRunner(command).run(
const <String>['build', 'ios', '--no-pub']
);
expect(testLogger.statusText, contains('build/ios/iphoneos/Runner.app'));
}, overrides: <Type, Generator>{
FileSystem: () => fileSystem,
ProcessManager: () => FakeProcessManager.list(<FakeCommand>[
......
......@@ -218,6 +218,7 @@ void main() {
await createTestCommandRunner(command).run(
const <String>['build', 'ipa', '--no-pub']
);
expect(testLogger.statusText, contains('build/ios/archive/Runner.xcarchive'));
}, overrides: <Type, Generator>{
FileSystem: () => fileSystem,
ProcessManager: () => FakeProcessManager.list(<FakeCommand>[
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment