Check Xcode build setting FULL_PRODUCT_NAME for the name of the built app during flutter run (#47266)

This commit is contained in:
Jenn Magder
2019-12-19 14:18:10 -08:00
committed by GitHub
parent 41a911099b
commit 648a5d8a1e
21 changed files with 194 additions and 95 deletions

View File

@@ -44,7 +44,7 @@ Future<void> main() async {
'build',
'ios',
'iphoneos',
'Runner.app',
'hello.app',
));
if (!exists(ephemeralReleaseHostApp)) {
@@ -84,7 +84,7 @@ Future<void> main() async {
'build',
'ios',
'iphoneos',
'Runner.app',
'hello.app',
));
if (!exists(ephemeralProfileHostApp)) {
@@ -123,7 +123,7 @@ Future<void> main() async {
'build',
'ios',
'iphonesimulator',
'Runner.app',
'hello.app',
));
if (!exists(ephemeralDebugHostApp)) {
@@ -178,7 +178,7 @@ Future<void> main() async {
'build',
'ios',
'iphoneos',
'Runner.app',
'hello.app',
)));
if (!ephemeralHostAppWithCocoaPodsBuilt) {
@@ -223,7 +223,7 @@ Future<void> main() async {
'build',
'ios',
'iphoneos',
'Runner.app',
'hello.app',
)));
if (!editableHostAppBuilt) {

View File

@@ -410,7 +410,15 @@ class CompileTest {
watch.start();
await flutter('build', options: options);
watch.stop();
final String appPath = '$cwd/build/ios/Release-iphoneos/Runner.app/';
final Directory appBuildDirectory = dir(path.join(cwd, 'build/ios/Release-iphoneos'));
final Directory appBundle = appBuildDirectory
.listSync()
.whereType<Directory>()
.singleWhere((Directory directory) => path.extension(directory.path) == '.app', orElse: () => null);
if (appBundle == null) {
throw 'Failed to find app bundle in ${appBuildDirectory.path}';
}
final String appPath = appBundle.path;
// IPAs are created manually, https://flutter.dev/ios-release/
await exec('tar', <String>['-zcf', 'build/app.ipa', appPath]);
releaseSizeInBytes = await file('$cwd/build/app.ipa').length();