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 {
bool prebuiltApplication = false,
bool ipv6 = false,
}) async {
String packageId;
if (!prebuiltApplication) {
// TODO(chinmaygarde): Use mainPath, route.
printTrace('Building ${package.name} for $id');
......@@ -288,12 +291,15 @@ class IOSDevice extends Device {
printError('');
return LaunchResult.failed();
}
packageId = buildResult.xcodeBuildExecution?.buildSettings['PRODUCT_BUNDLE_IDENTIFIER'];
} else {
if (!await installApp(package)) {
return LaunchResult.failed();
}
}
packageId ??= package.id;
// Step 2: Check that the application exists at the specified path.
final IOSApp iosApp = package;
final Directory bundle = fs.directory(iosApp.deviceBundlePath);
......@@ -367,7 +373,7 @@ class IOSDevice extends Device {
try {
printTrace('Application launched on the device. Waiting for observatory port.');
localUri = await MDnsObservatoryDiscovery.instance.getObservatoryUri(
package.id,
packageId,
this,
ipv6,
debuggingOptions.observatoryPort,
......
......@@ -562,7 +562,16 @@ Future<XcodeBuildResult> buildXcodeProject({
} else {
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