Check Xcode build setting FULL_PRODUCT_NAME for bundle name (#55799)

This commit is contained in:
Jenn Magder
2020-05-04 11:31:08 -07:00
committed by GitHub
parent 741ef91961
commit c8c55b4098
14 changed files with 319 additions and 222 deletions

View File

@@ -451,7 +451,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();