Include debug symbol in xcframework when building iOS-framework (#80065)

This commit is contained in:
Core
2021-04-15 03:48:39 +07:00
committed by GitHub
parent 8920f7a5d5
commit d6fbfdb9cd
2 changed files with 28 additions and 1 deletions

View File

@@ -310,6 +310,17 @@ Future<void> _testBuildIosFramework(Directory projectDir, { bool isModule = fals
'DeviceInfoPlugin.h',
));
if (mode != 'Debug') {
checkDirectoryExists(path.join(
outputPath,
mode,
'device_info.xcframework',
localXcodeArmDirectoryName,
'dSYMs',
'device_info.framework.dSYM',
));
}
final String simulatorFrameworkPath = path.join(
outputPath,
mode,
@@ -333,6 +344,14 @@ Future<void> _testBuildIosFramework(Directory projectDir, { bool isModule = fals
checkFileExists(simulatorFrameworkHeaderPath);
}
checkDirectoryExists(path.join(
outputPath,
'Release',
'device_info.xcframework',
localXcodeArmDirectoryName,
'BCSymbolMaps',
));
section('Check all modes have generated plugin registrant');
for (final String mode in <String>['Debug', 'Profile', 'Release']) {

View File

@@ -525,7 +525,15 @@ end
'-create-xcframework',
for (Directory framework in frameworks) ...<String>[
'-framework',
framework.path
framework.path,
...framework.parent
.listSync()
.where((FileSystemEntity entity) =>
entity.basename.endsWith('bcsymbolmap') ||
entity.basename.endsWith('dSYM'))
.map((FileSystemEntity entity) =>
<String>['-debug-symbols', entity.path])
.expand<String>((List<String> parameter) => parameter)
],
'-output',
outputDirectory.childDirectory('$frameworkBinaryName.xcframework').path