From 8507b72af55a7e95e2e372ce0ed6a3c83800a051 Mon Sep 17 00:00:00 2001 From: Mikkel Nygaard Ravn Date: Tue, 13 Feb 2018 22:19:03 +0100 Subject: [PATCH] Fix xcode build settings parsing (#14672) --- packages/flutter_tools/lib/src/ios/xcodeproj.dart | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/packages/flutter_tools/lib/src/ios/xcodeproj.dart b/packages/flutter_tools/lib/src/ios/xcodeproj.dart index 47b3d5c6025..1bc8e79497d 100644 --- a/packages/flutter_tools/lib/src/ios/xcodeproj.dart +++ b/packages/flutter_tools/lib/src/ios/xcodeproj.dart @@ -12,7 +12,7 @@ import '../build_info.dart'; import '../cache.dart'; import '../globals.dart'; -final RegExp _settingExpr = new RegExp(r'(\w+)\s*=\s*(\S+)'); +final RegExp _settingExpr = new RegExp(r'(\w+)\s*=\s*(.*)$'); final RegExp _varExpr = new RegExp(r'\$\((.*)\)'); String flutterFrameworkDir(BuildMode mode) { @@ -77,9 +77,10 @@ Map getXcodeBuildSettings(String xcodeProjPath, String target) { Map parseXcodeBuildSettings(String showBuildSettingsOutput) { final Map settings = {}; - for (String line in showBuildSettingsOutput.split('\n').where(_settingExpr.hasMatch)) { - final Match match = _settingExpr.firstMatch(line); - settings[match[1]] = match[2]; + for (Match match in showBuildSettingsOutput.split('\n').map(_settingExpr.firstMatch)) { + if (match != null) { + settings[match[1]] = match[2]; + } } return settings; }