Unverified Commit ea21938c authored by Jenn Magder's avatar Jenn Magder Committed by GitHub

Remove symroot from generated iOS Xcode build settings (#82576)

parent 77ab21e0
......@@ -30,8 +30,6 @@ String flutterMacOSFrameworkDir(BuildMode mode, FileSystem fileSystem,
/// useMacOSConfig: Optional parameter that controls whether we use the macOS
/// project file instead. Defaults to false.
///
/// setSymroot: Optional parameter to control whether to set SYMROOT.
///
/// targetOverride: Optional parameter, if null or unspecified the default value
/// from xcode_backend.sh is used 'lib/main.dart'.
Future<void> updateGeneratedXcodeProperties({
......@@ -39,7 +37,6 @@ Future<void> updateGeneratedXcodeProperties({
@required BuildInfo buildInfo,
String targetOverride,
bool useMacOSConfig = false,
bool setSymroot = true,
String buildDirOverride,
}) async {
final List<String> xcodeBuildSettings = _xcodeBuildSettingsLines(
......@@ -47,7 +44,6 @@ Future<void> updateGeneratedXcodeProperties({
buildInfo: buildInfo,
targetOverride: targetOverride,
useMacOSConfig: useMacOSConfig,
setSymroot: setSymroot,
buildDirOverride: buildDirOverride,
);
......@@ -149,7 +145,6 @@ List<String> _xcodeBuildSettingsLines({
@required BuildInfo buildInfo,
String targetOverride,
bool useMacOSConfig = false,
bool setSymroot = true,
String buildDirOverride,
}) {
final List<String> xcodeBuildSettings = <String>[];
......@@ -172,10 +167,6 @@ List<String> _xcodeBuildSettingsLines({
// The build outputs directory, relative to FLUTTER_APPLICATION_PATH.
xcodeBuildSettings.add('FLUTTER_BUILD_DIR=${buildDirOverride ?? getBuildDirectory()}');
if (setSymroot) {
xcodeBuildSettings.add('SYMROOT=\${SOURCE_ROOT}/../${getIosBuildDirectory()}');
}
final String buildName = parsedBuildName(manifest: project.manifest, buildInfo: buildInfo) ?? '1.0.0';
xcodeBuildSettings.add('FLUTTER_BUILD_NAME=$buildName');
......
......@@ -62,7 +62,6 @@ Future<void> buildMacOS({
buildInfo: buildInfo,
targetOverride: targetOverride,
useMacOSConfig: true,
setSymroot: false,
);
await processPodsIfNeeded(flutterProject.macos, getMacOSBuildDirectory(), buildInfo.mode);
// If the xcfilelists do not exist, create empty version.
......
......@@ -1164,7 +1164,6 @@ class MacOSProject extends FlutterProjectPlatform implements XcodeBasedProject {
project: parent,
buildInfo: BuildInfo.debug,
useMacOSConfig: true,
setSymroot: false,
);
}
}
......
......@@ -1100,6 +1100,8 @@ void main() {
expect(xcodeConfig, contains('FLUTTER_APPLICATION_PATH='));
expect(xcodeConfig, contains('FLUTTER_TARGET='));
expect(xcodeConfig, contains('COCOAPODS_PARALLEL_CODE_SIGN=true'));
// Avoid legacy build locations to support Swift Package Manager.
expect(xcodeConfig, isNot(contains('SYMROOT')));
// Generated export environment variables script
final String buildPhaseScriptPath = globals.fs.path.join('.ios', 'Flutter', 'flutter_export_environment.sh');
......@@ -1110,6 +1112,8 @@ void main() {
expect(buildPhaseScript, contains('FLUTTER_APPLICATION_PATH='));
expect(buildPhaseScript, contains('FLUTTER_TARGET='));
expect(buildPhaseScript, contains('COCOAPODS_PARALLEL_CODE_SIGN=true'));
// Do not override host app build settings.
expect(buildPhaseScript, isNot(contains('SYMROOT')));
// Generated podspec
final String podspecPath = globals.fs.path.join('.ios', 'Flutter', 'flutter_project.podspec');
......
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