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