Commit ccfdf95c authored by knaeckeKami's avatar knaeckeKami Committed by Jenn Magder

Use PRODUCT_BUNDLE_IDENTIFIER from buildSettings to find correct bundle id on...

Use PRODUCT_BUNDLE_IDENTIFIER from buildSettings to find correct bundle id on iOS when using flavors (#42964)
parent f7d78d5b
...@@ -267,6 +267,9 @@ class IOSDevice extends Device { ...@@ -267,6 +267,9 @@ class IOSDevice extends Device {
bool prebuiltApplication = false, bool prebuiltApplication = false,
bool ipv6 = false, bool ipv6 = false,
}) async { }) async {
String packageId;
if (!prebuiltApplication) { if (!prebuiltApplication) {
// TODO(chinmaygarde): Use mainPath, route. // TODO(chinmaygarde): Use mainPath, route.
printTrace('Building ${package.name} for $id'); printTrace('Building ${package.name} for $id');
...@@ -288,12 +291,15 @@ class IOSDevice extends Device { ...@@ -288,12 +291,15 @@ class IOSDevice extends Device {
printError(''); printError('');
return LaunchResult.failed(); return LaunchResult.failed();
} }
packageId = buildResult.xcodeBuildExecution?.buildSettings['PRODUCT_BUNDLE_IDENTIFIER'];
} else { } else {
if (!await installApp(package)) { if (!await installApp(package)) {
return LaunchResult.failed(); return LaunchResult.failed();
} }
} }
packageId ??= package.id;
// Step 2: Check that the application exists at the specified path. // Step 2: Check that the application exists at the specified path.
final IOSApp iosApp = package; final IOSApp iosApp = package;
final Directory bundle = fs.directory(iosApp.deviceBundlePath); final Directory bundle = fs.directory(iosApp.deviceBundlePath);
...@@ -367,7 +373,7 @@ class IOSDevice extends Device { ...@@ -367,7 +373,7 @@ class IOSDevice extends Device {
try { try {
printTrace('Application launched on the device. Waiting for observatory port.'); printTrace('Application launched on the device. Waiting for observatory port.');
localUri = await MDnsObservatoryDiscovery.instance.getObservatoryUri( localUri = await MDnsObservatoryDiscovery.instance.getObservatoryUri(
package.id, packageId,
this, this,
ipv6, ipv6,
debuggingOptions.observatoryPort, debuggingOptions.observatoryPort,
......
...@@ -562,7 +562,16 @@ Future<XcodeBuildResult> buildXcodeProject({ ...@@ -562,7 +562,16 @@ Future<XcodeBuildResult> buildXcodeProject({
} else { } else {
printError('Build succeeded but the expected app at $expectedOutputDirectory not found'); printError('Build succeeded but the expected app at $expectedOutputDirectory not found');
} }
return XcodeBuildResult(success: true, output: outputDir); return XcodeBuildResult(
success: true,
output: outputDir,
xcodeBuildExecution: XcodeBuildExecution(
buildCommands: buildCommands,
appDirectory: app.project.hostAppRoot.path,
buildForPhysicalDevice: buildForDevice,
buildSettings: buildSettings,
),
);
} }
} }
......
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